mirror of
https://github.com/neovim/neovim.git
synced 2025-11-11 13:05:37 +00:00
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:
@@ -581,7 +581,13 @@ do
|
||||
if string.match(args.data.sequence, '^\027]133;A') then
|
||||
local lnum = args.data.cursor[1] ---@type integer
|
||||
if lnum >= 1 then
|
||||
vim.api.nvim_buf_set_extmark(args.buf, nvim_terminal_prompt_ns, lnum - 1, 0, {})
|
||||
vim.api.nvim_buf_set_extmark(
|
||||
args.buf,
|
||||
nvim_terminal_prompt_ns,
|
||||
lnum - 1,
|
||||
0,
|
||||
{ right_gravity = false }
|
||||
)
|
||||
end
|
||||
end
|
||||
end,
|
||||
|
||||
Reference in New Issue
Block a user