diff options
| author | Christian Clason <c.clason@uni-graz.at> | 2021-12-26 11:03:25 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-26 11:03:25 +0100 |
| commit | 8c720f6b9d3217e2a9449ce13aac02406edbbb4e (patch) | |
| tree | d27747fd449d64e792e890eb729e2123701d40c6 /runtime/pack/dist/opt/termdebug/plugin | |
| parent | 9dd8557921ec94035971a3145ab744add858459a (diff) | |
| download | rneovim-8c720f6b9d3217e2a9449ce13aac02406edbbb4e.tar.gz rneovim-8c720f6b9d3217e2a9449ce13aac02406edbbb4e.tar.bz2 rneovim-8c720f6b9d3217e2a9449ce13aac02406edbbb4e.zip | |
vim-patch:partial fa3b72348d88 (#16780)
Update runtime files
https://github.com/vim/vim/commit/fa3b72348d88343390fbe212cfc230fec1602fc2
omit
doc/eval.txt (needs 8.2.3864)
doc/map.txt (needs 8.2.3619)
menu.vim (needs 8.2.0413)
Diffstat (limited to 'runtime/pack/dist/opt/termdebug/plugin')
| -rw-r--r-- | runtime/pack/dist/opt/termdebug/plugin/termdebug.vim | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim index 8fa556aab6..f9978a6b00 100644 --- a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim +++ b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim @@ -104,6 +104,10 @@ call s:Highlight(1, '', &background) hi default debugBreakpoint term=reverse ctermbg=red guibg=red hi default debugBreakpointDisabled term=reverse ctermbg=gray guibg=gray +func s:GetCommand() + return type(g:termdebugger) == v:t_list ? copy(g:termdebugger) : [g:termdebugger] +endfunc + func s:StartDebug(bang, ...) " First argument is the command to debug, second core file or process ID. call s:StartDebug_internal({'gdb_args': a:000, 'bang': a:bang}) @@ -119,8 +123,9 @@ func s:StartDebug_internal(dict) echoerr 'Terminal debugger already running, cannot run two' return endif - if !executable(g:termdebugger) - echoerr 'Cannot execute debugger program "' .. g:termdebugger .. '"' + let gdbcmd = s:GetCommand() + if !executable(gdbcmd[0]) + echoerr 'Cannot execute debugger program "' .. gdbcmd[0] .. '"' return endif @@ -192,7 +197,7 @@ endfunc func s:CheckGdbRunning() if nvim_get_chan_info(s:gdb_job_id) == {} - echoerr string(g:termdebugger) . ' exited unexpectedly' + echoerr string(s:GetCommand()[0]) . ' exited unexpectedly' call s:CloseBuffers() return '' endif @@ -245,7 +250,7 @@ func s:StartDebug_term(dict) let gdb_args = get(a:dict, 'gdb_args', []) let proc_args = get(a:dict, 'proc_args', []) - let gdb_cmd = [g:termdebugger] + let gdb_cmd = s:GetCommand() " Add -quiet to avoid the intro message causing a hit-enter prompt. let gdb_cmd += ['-quiet'] " Disable pagination, it causes everything to stop at the gdb @@ -379,7 +384,7 @@ func s:StartDebug_prompt(dict) let gdb_args = get(a:dict, 'gdb_args', []) let proc_args = get(a:dict, 'proc_args', []) - let gdb_cmd = [g:termdebugger] + let gdb_cmd = s:GetCommand() " Add -quiet to avoid the intro message causing a hit-enter prompt. let gdb_cmd += ['-quiet'] " Disable pagination, it causes everything to stop at the gdb, needs to be run early |