Skip to content

Commit

Permalink
debug: fix mappings
Browse files Browse the repository at this point in the history
Apply mappings in correct order.

s:create_layout configures only breakpoint and continue mappings.
s:continue configures all the the debug related mappings.
s:create_layout is called in s:connect after it calls
go#debug#Stack('halt'), which in turn calls s:continue, so be sure to
only call s:continue in go#debug#Stack when its single argument is not
'halt'.

Fixes #3568
  • Loading branch information
bhcleek committed Aug 20, 2023
1 parent ca29cf8 commit b8dbe29
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions autoload/go/debug.vim
Original file line number Diff line number Diff line change
Expand Up @@ -630,8 +630,8 @@ function! s:connect(addr) abort

let s:state['ch'] = l:ch

" Set running because so that the next go#debug#Stack call doesn't change
" operation to continue.
" Set running so that the next go#debug#Stack call doesn't change operation
" to continue.
let s:state['running'] = 0

" It is ok to halt whether whether delve was started with connect, debug, or
Expand Down Expand Up @@ -1370,9 +1370,9 @@ function! go#debug#Stack(name) abort
if s:state.running is 0
if l:name != 'halt'
let l:name = 'continue'
let s:state.running = 1
call s:continue()
endif
let s:state.running = 1
call s:continue()
endif

" Add a breakpoint to the main.Main if the user didn't define any.
Expand Down

0 comments on commit b8dbe29

Please sign in to comment.