Skip to content

Commit 49f1afb

Browse files
committed
debug: avoid abort that was causing Neovim quit to hang
Do not attempt to delete a command based on the first line of output from ":command GoDebug" trying to stop debugging. The error was causing the function to be aborted, which was in turn causing Neovim to hang when trying to quit.
1 parent 98c7803 commit 49f1afb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

autoload/go/debug.vim

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,9 @@ endfunction
320320
function! go#debug#Stop() abort
321321
" Remove all commands and add back the default commands.
322322
for k in map(split(execute('command GoDebug'), "\n")[1:], 'matchstr(v:val, "^\\s*\\zs\\S\\+")')
323+
if k is 'Name'
324+
continue
325+
endif
323326
exe 'delcommand' k
324327
endfor
325328
command! -nargs=* -complete=customlist,go#package#Complete GoDebugStart call go#debug#Start('debug', <f-args>)

0 commit comments

Comments
 (0)