From efef797126506e84fadfc7214ffc55aa7c084e80 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Mon, 30 Sep 2019 20:17:11 -0400 Subject: 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 --- runtime/pack/dist/opt/termdebug/plugin/termdebug.vim | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'runtime/pack/dist/opt/termdebug/plugin/termdebug.vim') 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(0, 0, ) " 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 -- cgit From 83b6d9f197a44e3b8140619e6b7e9950f217aafb Mon Sep 17 00:00:00 2001 From: Jelte Fennema Date: Tue, 29 Oct 2019 05:05:49 +0100 Subject: termdebug.vim: reset evalFromBalloonExprResult #11309 The value is used again in case of a pointer and it will cause errors then. --- runtime/pack/dist/opt/termdebug/plugin/termdebug.vim | 1 + 1 file changed, 1 insertion(+) (limited to 'runtime/pack/dist/opt/termdebug/plugin/termdebug.vim') diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim index 52b4829f5f..b9fc77dc37 100644 --- a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim +++ b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim @@ -583,6 +583,7 @@ func s:HandleEvaluate(msg) endif let s:evalFromBalloonExprResult = split(s:evalFromBalloonExprResult, '\\n') call s:OpenHoverPreview(s:evalFromBalloonExprResult, v:null) + let s:evalFromBalloonExprResult = '' else echomsg '"' . s:evalexpr . '": ' . value endif -- cgit