fix(terminal): adjust marks when deleting scrollback lines (#36294)

This also fixes inconsistent scrolling behavior on terminal output when
cursor is in the middle of the buffer and the scrollback is full.
This commit is contained in:
zeertzjq
2025-10-25 06:48:04 +08:00
committed by GitHub
parent d909de2dc2
commit 520568f40f
7 changed files with 260 additions and 34 deletions

View File

@@ -227,6 +227,15 @@ describe(':terminal mouse', function()
it('will forward mouse clicks to the program with the correct even if set nu', function()
skip(is_os('win'))
command('set number')
screen:expect([[
{121: 11 }line28 |
{121: 12 }line29 |
{121: 13 }line30 |
{121: 14 }mouse enabled |
{121: 15 }rows: 6, cols: 46 |
{121: 16 }^ |
{5:-- TERMINAL --} |
]])
-- When the display area such as a number is clicked, it returns to the
-- normal mode.
feed('<LeftMouse><3,0>')