diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-09-30 20:17:11 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-10-01 22:27:45 -0400 |
commit | efef797126506e84fadfc7214ffc55aa7c084e80 (patch) | |
tree | 5b2439b727b53d7da20d3834d306c0c81f4fd9b8 | |
parent | 655085204e36cdf91750db5e09ae3feb4884c670 (diff) | |
download | rneovim-efef797126506e84fadfc7214ffc55aa7c084e80.tar.gz rneovim-efef797126506e84fadfc7214ffc55aa7c084e80.tar.bz2 rneovim-efef797126506e84fadfc7214ffc55aa7c084e80.zip |
vim-patch:8.1.2103: wrong error message if "termdebugger" is not executable
Problem: wrong error message if "termdebugger" is not executable.
Solution: Check if "termdebugger" is executable and give a clear error
message. (Ozaki Kiichi, closes vim/vim#5000) Fix indents.
https://github.com/vim/vim/commit/18223a592efa4399e3951c86deeb712a13b05ca5
-rw-r--r-- | runtime/pack/dist/opt/termdebug/plugin/termdebug.vim | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim index a97461ad69..52b4829f5f 100644 --- a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim +++ b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim @@ -67,8 +67,8 @@ command -nargs=* -complete=file -bang Termdebug call s:StartDebug(<bang>0, <f-ar command -nargs=+ -complete=file -bang TermdebugCommand call s:StartDebugCommand(<bang>0, <f-args>) " Name of the gdb command, defaults to "gdb". -if !exists('termdebugger') - let termdebugger = 'gdb' +if !exists('g:termdebugger') + let g:termdebugger = 'gdb' endif let s:pc_id = 12 @@ -106,9 +106,14 @@ endfunc func s:StartDebug_internal(dict) if exists('s:gdbwin') - echoerr 'Terminal debugger already running' + echoerr 'Terminal debugger already running, cannot run two' return endif + if !executable(g:termdebugger) + echoerr 'Cannot execute debugger program "' .. g:termdebugger .. '"' + return + endif + let s:ptywin = 0 let s:pid = 0 |