sublimehq / sublime_text

Issue tracker for Sublime Text
https://www.sublimetext.com
807 stars 39 forks source link

Cursor does not position correctly at start of automatically broken line #5476

Open rogeriodec opened 2 years ago

rogeriodec commented 2 years ago

Description of the bug

When I have Word Wrap enabled and a text exceeds the line character limit, the cursor does not go through the first character of the wrapped text on the line below.

Steps to reproduce

1) Activate Word Wrap 2) Type something until it forces the line to wrap automatically 3) Move the cursor between the last character of the first line and the first character of the next line and you will see that it does not position itself on this first character of the next line. a

Expected behavior

The cursor should be positioned BEFORE the first character of the next line

Actual behavior

The cursor should be ignoring the first character of the next line

Sublime Text build number

4126

Operating system & version

Windows 10

(Linux) Desktop environment and/or window manager

No response

Additional information

No response

OpenGL context information

No response

deathaxe commented 2 years ago

The caret is directly in front of 1 if it is rendered at the the end of line 1. As newline character is skipped (ignored aka. not handled when navigating), moving onward results in caret visually jumping from end of line 1 to column 2 on line 2.

A probably easier to follow approach was to directly render the caret in front of 1 in line 2 when it is moved after the last character of line 1.

frithrah commented 10 months ago

I would love to see this fixed. It's an oddity that confuses me often (you'd think I'd be used to it by now). My Christmas wish!

hannes-ucsc commented 1 month ago

This might be a matter of preference. I wouldn't be surprised if half of the user base likes it the current way. I personally like to see the cursor at the beginning of the line rather than the end of the preceding one.