zed/crates/editor
lord f0c7e62adc
Leave goal_x unchanged when moving by rows past the start or end of the document (#20705)
Perhaps this was intentional behavior, but if not, I've attempted to
write this hacky fix — I noticed using the vertical arrow keys to move
past the document start/end would reset the goal_x to either zero (for
moving upwards) or the line width (for moving downwards). This change
makes Zed match most native text fields (at least on macOS) which leave
goal_x unchanged, even when hitting the end of the document.

I tested this change manually. Would be happy to add automatic tests for
it too, but couldn't find any existing cursor movement tests.

Release Notes:

- Behavior when moving vertically past the start or end of a document
now matches native text fields; it no longer resets the selection goal
2024-11-18 16:32:43 -07:00
..
src Leave goal_x unchanged when moving by rows past the start or end of the document (#20705) 2024-11-18 16:32:43 -07:00
Cargo.toml Improve rewrap for ideographic writing systems (#20218) 2024-11-05 14:22:21 -07:00
LICENSE-GPL