commit 3e6db5b2ec6fc152f70246f58654d762527c9ef2
parent fd45bc8caba2b7f40bdb64aec4c997cc9849fff6
Author: Phạm Bình An <111893501+brianhuster@users.noreply.github.com>
Date: Wed, 28 Jan 2026 06:19:38 +0700
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.
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
@@ -692,7 +692,9 @@ func s:GdbOutCallback(job_id, msgs, event)
" Add the output above the current prompt.
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
if !empty(lines)
set modified