Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

view.expand_to_scope(...) will stop at phantom #5333

Closed
jfcherng opened this issue Mar 25, 2022 · 1 comment
Closed

view.expand_to_scope(...) will stop at phantom #5333

jfcherng opened this issue Mar 25, 2022 · 1 comment

Comments

@jfcherng
Copy link

jfcherng commented Mar 25, 2022

Description of the bug

The returned region of the view.expand_to_scope(...) API introduced in ST 4130 will stop at phantom position.

Steps to reproduce

  1. Start ST in safe mode
  2. Open a new buffer
  3. Set syntax to Python
  4. Write string: "this is a string"
  5. Create a phantom in the string:
    image
    # in ST console, for example, put a phantom "X" at position 4
    ps = sublime.PhantomSet(view, 'psKey'); ps.update([sublime.Phantom(sublime.Region(4, 4), "X", sublime.LAYOUT_INLINE)])
  6. Run view.expand_to_scope(...)
    # in ST console
    view.expand_to_scope(0, 'string')
  7. The result is Region(0, 4), which means it stops at the phantom position.

Expected behavior

Region(0, 18)

Actual behavior

Region(0, 4)

Sublime Text build number

4131

Operating system & version

Win10 x64

@jfcherng
Copy link
Author

jfcherng commented May 27, 2022

Confirm fixed in 4132.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants