aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-05-24 14:46:41 -0400
committerGitHub <noreply@github.com>2020-05-24 20:46:41 +0200
commit37ee95504e43d246f4fa971fb7a38c2a1bc6b16f (patch)
tree3c7f1c20de1273fa4faea25e976511a60695b9b9
parente89462d9855eef7718d482df7f92da4279a1c5c3 (diff)
downloadrneovim-37ee95504e43d246f4fa971fb7a38c2a1bc6b16f.tar.gz
rneovim-37ee95504e43d246f4fa971fb7a38c2a1bc6b16f.tar.bz2
rneovim-37ee95504e43d246f4fa971fb7a38c2a1bc6b16f.zip
vim-patch:8.0.1668: terminal debugger: can't re-open source code window (#12329)
Problem: Terminal debugger: can't re-open source code window. Solution: Add the :Source command. Also create the window if needed when gdb stops at a source line. https://github.com/vim/vim/commit/c4b533e1e93151658cb170c6796d327a8c0f8612
-rw-r--r--runtime/pack/dist/opt/termdebug/plugin/termdebug.vim21
1 files changed, 17 insertions, 4 deletions
diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
index aa2b69ad97..28dc3256c7 100644
--- a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
+++ b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
@@ -645,7 +645,7 @@ func s:InstallCommands()
command Gdb call win_gotoid(s:gdbwin)
command Program call win_gotoid(s:ptywin)
command Source call s:GotoSourcewinOrCreateIt()
- " command Winbar call s:InstallWinbar()
+ command Winbar call s:InstallWinbar()
" TODO: can the K mapping be restored?
nnoremap K :Evaluate<CR>
@@ -655,6 +655,19 @@ endfunc
" let s:winbar_winids = []
+" Install the window toolbar in the current window.
+func s:InstallWinbar()
+ " if has('menu') && &mouse != ''
+ " nnoremenu WinBar.Step :Step<CR>
+ " nnoremenu WinBar.Next :Over<CR>
+ " nnoremenu WinBar.Finish :Finish<CR>
+ " nnoremenu WinBar.Cont :Continue<CR>
+ " nnoremenu WinBar.Stop :Stop<CR>
+ " nnoremenu WinBar.Eval :Evaluate<CR>
+ " call add(s:winbar_winids, win_getid(winnr()))
+ " endif
+endfunc
+
" Delete installed debugger commands in the current window.
func s:DeleteCommands()
delcommand Break
@@ -670,7 +683,7 @@ func s:DeleteCommands()
delcommand Gdb
delcommand Program
delcommand Source
- " delcommand Winbar
+ delcommand Winbar
nunmap K
@@ -940,7 +953,7 @@ func s:GotoSourcewinOrCreateIt()
if !win_gotoid(s:sourcewin)
new
let s:sourcewin = win_getid(winnr())
- " call s:InstallWinbar()
+ call s:InstallWinbar()
endif
endfunc
@@ -971,7 +984,7 @@ func s:HandleCursor(msg)
" TODO: find existing window
exe 'split ' . fnameescape(fname)
let s:sourcewin = win_getid(winnr())
- " call s:InstallWinbar()
+ call s:InstallWinbar()
else
exe 'edit ' . fnameescape(fname)
endif