Currently, when ScrollYCaretPolicy = 1 (enabled and is not 50%, i.e. there are more than 1 line in the middle of the screen that the cursor can move without causing new scrolling) and you press on Arrow keys, the document is scrolled by 1 line. Make it so that it's scrolled by as many lines as possible in the opposite direction (controlled by new boolean setting OverscrollYCaret, enabled by default).
For example, consider a window with 5 lines and arbitrary long document (1, 2, 3, ..., N-1, N), and ScrollYCaretPolicy allowing cursor at lines 2-4 only (i.e. scrolling if cursor is on line 1 or 5):
Cursor is on line 4
Press Down
Cursor is on line 5 and the window is scrolled because of ScrollYCaretPolicy; it now shows lines 2-6
Press Down
Scroll, now showing 3-7
Instead, what should happen:
Cursor is on line 4
Press Down
Cursor is on line 5 but the window is showing lines 4-8 so it was scrolled by 3 lines, not 1
Press Down
Cursor is on line 6 and no scrolling
Press Down
Line 7, no scrolling
Press Down
Line 8, showing lines 7-11
This way, if user is navigating document from top to bottom he will get much less scrolling (instead one scrolling per line traveled).
Likewise, if pressing Up the line with the cursor should appear on the bottom of the screen.
Described behaviour for Arrow keys is the minimum. Ideally, no keys should be exceptional and this behaviour should be applied to any scrolling (F3, etc.): if current scroll position is above new caret line then put caret line on the top, else on bottom.
Currently, when ScrollYCaretPolicy = 1 (enabled and is not 50%, i.e. there are more than 1 line in the middle of the screen that the cursor can move without causing new scrolling) and you press on Arrow keys, the document is scrolled by 1 line. Make it so that it's scrolled by as many lines as possible in the opposite direction (controlled by new boolean setting
OverscrollYCaret
, enabled by default).For example, consider a window with 5 lines and arbitrary long document (1, 2, 3, ..., N-1, N), and ScrollYCaretPolicy allowing cursor at lines 2-4 only (i.e. scrolling if cursor is on line 1 or 5):
Instead, what should happen:
This way, if user is navigating document from top to bottom he will get much less scrolling (instead one scrolling per line traveled).
Likewise, if pressing Up the line with the cursor should appear on the bottom of the screen.
Described behaviour for Arrow keys is the minimum. Ideally, no keys should be exceptional and this behaviour should be applied to any scrolling (F3, etc.): if current scroll position is above new caret line then put caret line on the top, else on bottom.