mirror of
https://github.com/neovim/neovim.git
synced 2026-01-05 02:47:28 +10:00
fix(terminal): wrong row in TermRequest with full scrollback (#36298)
Problem: Wrong row in TermRequest with full scrollback. Solution: Subtract by the number of lines deleted from scrollback.
This commit is contained in:
@@ -580,7 +580,9 @@ do
|
||||
callback = function(args)
|
||||
if string.match(args.data.sequence, '^\027]133;A') then
|
||||
local lnum = args.data.cursor[1] ---@type integer
|
||||
vim.api.nvim_buf_set_extmark(args.buf, nvim_terminal_prompt_ns, lnum - 1, 0, {})
|
||||
if lnum >= 1 then
|
||||
vim.api.nvim_buf_set_extmark(args.buf, nvim_terminal_prompt_ns, lnum - 1, 0, {})
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user