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.
This commit is contained in:
Sean Dewar 2023-08-22 20:54:41 +01:00
parent af78060b18
commit c413b42c45
No known key found for this signature in database
GPG Key ID: 08CC2C83AD41B581

View File

@ -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