aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Dewar <seandewar@users.noreply.github.com>2023-08-22 20:54:41 +0100
committerSean Dewar <seandewar@users.noreply.github.com>2023-08-25 10:59:57 +0100
commitc413b42c456bc48ef58d4e2ac9b3862787819282 (patch)
tree7aad60bcecfb175ca802810f72d4987eb43fd678
parentaf78060b188236cca9ef3479cbab94df56c89721 (diff)
downloadrneovim-c413b42c456bc48ef58d4e2ac9b3862787819282.tar.gz
rneovim-c413b42c456bc48ef58d4e2ac9b3862787819282.tar.bz2
rneovim-c413b42c456bc48ef58d4e2ac9b3862787819282.zip
fix(termdebug): prompt mode breaks with &splitbelow set
Unlike Vim, termopen() doesn't split, so you can't use the modifier like that. Remove the fragile :wincmd shenanigans.
-rw-r--r--runtime/pack/dist/opt/termdebug/plugin/termdebug.vim9
1 files changed, 4 insertions, 5 deletions
diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
index c490fbf441..4108a6a19f 100644
--- a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
+++ b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
@@ -204,9 +204,9 @@ func s:StartDebug_internal(dict)
endif
if !has('win32') && !use_prompt
let s:way = 'terminal'
- else
+ else
let s:way = 'prompt'
- endif
+ endif
if s:way == 'prompt'
call s:StartDebug_prompt(a:dict)
@@ -484,9 +484,8 @@ func s:StartDebug_prompt(dict)
else
" Unix: Run the debugged program in a terminal window. Open it below the
" gdb window.
- execute 'new'
- wincmd x | wincmd j
- belowright let s:pty_job_id = termopen('tail -f /dev/null;#gdb program')
+ belowright new
+ let s:pty_job_id = termopen('tail -f /dev/null;#gdb program')
if s:pty_job_id == 0
call s:Echoerr('Invalid argument (or job table is full) while opening terminal window')
return