fix(ui2): don't scroll beyond eob in dialog window #36116

Problem:  Forward page scrolling reveals eob lines in the dialog window.
Solution: Check if the end of the buffer is visible before scrolling down.
This commit is contained in:
luukvbaal
2025-10-10 16:05:40 +02:00
committed by GitHub
parent 56713ef872
commit d8cea8d45d
2 changed files with 20 additions and 4 deletions

View File

@@ -344,7 +344,23 @@ describe('messages2', function()
99 |
Type number and <Enter> or click with the mouse (q or empty cancels): ^ |
]])
feed('g')
-- No scrolling beyond end of buffer #36114
feed('f')
screen:expect([[
|
{1:~ }|*3
{3:───────────────────────────────────────────────────────────────────────}|
93 [+93] |
94 |
95 |
96 |
97 |
98 |
99 |
Type number and <Enter> or click with the mouse (q or empty cancels): f|
^ |
]])
feed('<Backspace>g')
screen:expect(top)
end)