`find_under_expand` resets horizontal scroll
Description of the bug
When word wrap is disabled and you scrolled to the right, selecting several occurrences of something with ctrl+d scrolls to the left
It doesn't scroll to the left if cursors are further than 1 width apart
Steps to reproduce
- Start Sublime in safe mode
- Create line of dots with the size of 2 editor view's width
- "Word Wrap: Toggle"
- Select dot in the second quarter of line
- Scroll to the right
- Press ctrl+d
Expected behavior
Next dot is selected without scrolling to the left
Actual behavior
Next dot is selected and view is scrolled to the left
Sublime Text build number
4200
Operating system & version
NixOS unstable
(Linux) Desktop environment and/or window manager
Sway
Additional information
No response
OpenGL context information
Scroll position is not reset, but viewport is moved in all directions to reveal newly added selections.
I'd say that's intentional behavior as it is crucial to be able to verify whether new selection is desirable or needs to be skipped via ctrl+k,ctrl+d.
it is crucial to be able to verify whether new selection is desirable or needs to be skipped
Viewport is scrolled even when next possible selection is on the same line, but not scrolled, when selection can't be repeated on the same line. E.g. ([.] means selection, [.][.] means previous and new (after ctrl+d) selection):
| // viewport
............[.][.].. // scrolled
| // 2x viewport
...........................[.][.] // not scrolled