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

Inline phantom stops moving a cursor to the next line #6514

Open
jfcherng opened this issue Oct 16, 2024 · 0 comments
Open

Inline phantom stops moving a cursor to the next line #6514

jfcherng opened this issue Oct 16, 2024 · 0 comments
Assignees

Comments

@jfcherng
Copy link

jfcherng commented Oct 16, 2024

Description of the bug

When a phantom is at EOL and we tweak the width of the view by reducing ST's window size so that the phantom is wrapped into the "visual next line", you can't move the cursor to the next line by pressing key. The cursor will always be moved to the position before the phantom.

Steps to reproduce

  1. Starts ST in safe mode.

  2. Type ANYTHING and then press Enter to create an extra new line.

    image

  3. Run the following script in ST console to create an inline phantom at EOL of line 1.

    ps = sublime.PhantomSet(view); ps.update([sublime.Phantom(sublime.Region(8), 'THIS_IS_A_PHANTOM', sublime.PhantomLayout.INLINE)]);

    image

  4. Reduce window size so that the phantom is wrapped into the visual next line.

    image

  5. Move the cursor to any position of line 1.

    image

  6. Try to move to line 2 by pressing the key and you will find you can't. Keep pressing won't help.

    image

Expected behavior

The cursor can be moved to line 2.

Actual behavior

The cursor is stuck at the EOF of line 1 before the phantom.

Sublime Text build number

4183

Operating system & version

Win11 x64

@jfcherng jfcherng changed the title Phantom stops moving a cursor from moving to the next line Phantom stops moving a cursor to the next line Oct 16, 2024
@jfcherng jfcherng changed the title Phantom stops moving a cursor to the next line Inline phantom stops moving a cursor to the next line Oct 16, 2024
@valeriesubl valeriesubl self-assigned this Nov 27, 2024
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