fix(terminal): keep last cursor if it's on the last row

This commit is contained in:
zeertzjq
2025-10-28 08:10:58 +08:00
parent a2d4a0fda9
commit a6d8f40b64
4 changed files with 182 additions and 83 deletions

View File

@@ -254,7 +254,7 @@ describe('autocmd TextChangedT,WinResized', function()
screen:expect([[
hello │ab^ |
│ |*4
{31:[Scratch] [-] }{32:[Scratch] [-] }|
{31:[Scratch] }{32:[Scratch] }|
{1:-- TERMINAL --} |
]])
eq(2, exec_lua('return _G.t_triggered'))
@@ -273,7 +273,7 @@ describe('autocmd TextChangedT,WinResized', function()
screen:expect([[
hello │a^bc |
│ |*4
{31:[Scratch] [-] }{32:[Scratch] [-] }|
{31:[Scratch] }{32:[Scratch] }|
|
]])
eq(1, exec_lua('return _G.n_triggered')) -- Happened in Normal mode.