fix(termdebug): use mark : to get prompt line in prompt buffer #37336

Problem:
- Nvim supports multi-line input in prompt buffer, so line(`$`) is not
  always the prompt line.

Solution:
- Use `line("':")` to get the prompt line.
This commit is contained in:
Phạm Bình An
2026-01-28 06:19:38 +07:00
committed by GitHub
parent fd45bc8cab
commit 3e6db5b2ec

View File

@@ -692,7 +692,9 @@ func s:GdbOutCallback(job_id, msgs, event)
" Add the output above the current prompt. " Add the output above the current prompt.
for line in lines for line in lines
call append(line('$') - 1, line) " Nvim supports multi-line input in prompt-buffer, so the prompt line is
" not always the last line.
call append(line("':") - 1, line)
endfor endfor
if !empty(lines) if !empty(lines)
set modified set modified