diff options
| author | Phạm Bình An <111893501+brianhuster@users.noreply.github.com> | 2026-01-28 06:19:38 +0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-27 18:19:38 -0500 |
| commit | 3e6db5b2ec6fc152f70246f58654d762527c9ef2 (patch) | |
| tree | 9c85cf8e4dbd6c81e9acea8aa777191e28ce861c /runtime/pack/dist/opt/termdebug/plugin/termdebug.vim | |
| parent | fd45bc8caba2b7f40bdb64aec4c997cc9849fff6 (diff) | |
| download | rneovim-3e6db5b2ec6fc152f70246f58654d762527c9ef2.tar.gz rneovim-3e6db5b2ec6fc152f70246f58654d762527c9ef2.tar.bz2 rneovim-3e6db5b2ec6fc152f70246f58654d762527c9ef2.zip | |
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 (limited to 'runtime/pack/dist/opt/termdebug/plugin/termdebug.vim')
| -rw-r--r-- | runtime/pack/dist/opt/termdebug/plugin/termdebug.vim | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim index 18b36f4e70..a57f58164b 100644 --- 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 |