sublimehq / sublime_text

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

Select and Tab scrolls to the bottom #6491

Closed focusright closed 2 months ago

focusright commented 2 months ago

Description of the bug

Selecting a large block of code (over a page) and shifting it to the right with tab multiple times cause the screen to scroll to the bottom of the selected code. The way it used to work is while the tab shifting is happening the screen would remain as it is.

This bug causes a lot of issues for me since I perform this task repeatedly while coding.

Steps to reproduce

  1. Select a large block of code or text, say 100 lines.
  2. Hit tab to shift the code multiple times (3-5).
  3. Observe the screen scrolling to the bottom of the selected text.

Expected behavior

The screen should remain as it is without automatically scrolling to the bottom of the selected text.

Actual behavior

The screen scrolls to the bottom of the selected text.

Sublime Text build number

4180

Operating system & version

Windows 11 x64

(Linux) Desktop environment and/or window manager

No response

Additional information

I have two monitors.

OpenGL context information

No response

deathaxe commented 2 months ago

Do you happen to select text bottom up?

ST scrolls a view to reveal a moving caret. FWIW, I see same behavior from ST4107 to 4180 with regards to how it scrolls, when running in SAFE MODE. It partly scrolls down a bit, each time tab is hit. It tries, but fails to reveal the caret, IMHO.

The primary usability issue is indent and unindent manipulating caret location. If a selection was made bottom up, caret is moved from selection's beginning to end.

Instead, caret location should stay unmodified.

BenjaminSchaaf commented 2 months ago

Fixed in build 4181.