summaryrefslogtreecommitdiffstats
path: root/runtime/pack
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2023-04-22 22:40:14 +0100
committerBram Moolenaar <Bram@vim.org>2023-04-22 22:40:14 +0100
commit71badf9547e8f89571b9a095183671cbb333d528 (patch)
tree60d0393cb0236345eb4b5d26f98c8c9d030ce8b0 /runtime/pack
parent80406c26188219f3773b2e9c49160caeeb386ee2 (diff)
Update runtime files
Diffstat (limited to 'runtime/pack')
-rw-r--r--runtime/pack/dist/opt/termdebug/plugin/termdebug.vim25
1 files changed, 12 insertions, 13 deletions
diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
index 9fd4bcb3f5..b43b8ab507 100644
--- a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
+++ b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
@@ -877,7 +877,7 @@ func s:InstallCommands()
command Program call s:GotoProgram()
command Source call s:GotoSourcewinOrCreateIt()
command Asm call s:GotoAsmwinOrCreateIt()
- command Winbar call s:InstallWinbar()
+ command Winbar call s:InstallWinbar(1)
let map = 1
if exists('g:termdebug_config')
@@ -891,14 +891,7 @@ func s:InstallCommands()
endif
if has('menu') && &mouse != ''
- " install the window toolbar by default, can be disabled in the config
- let winbar = 1
- if exists('g:termdebug_config')
- let winbar = get(g:termdebug_config, 'winbar', 1)
- endif
- if winbar
- call s:InstallWinbar()
- endif
+ call s:InstallWinbar(0)
let popup = 1
if exists('g:termdebug_config')
@@ -923,8 +916,14 @@ endfunc
let s:winbar_winids = []
" Install the window toolbar in the current window.
-func s:InstallWinbar()
- if has('menu') && &mouse != ''
+func s:InstallWinbar(force)
+ " install the window toolbar by default, can be disabled in the config
+ let winbar = 1
+ if exists('g:termdebug_config')
+ let winbar = get(g:termdebug_config, 'winbar', 1)
+ endif
+
+ if has('menu') && &mouse != '' && (winbar || a:force)
nnoremenu WinBar.Step :Step<CR>
nnoremenu WinBar.Next :Over<CR>
nnoremenu WinBar.Finish :Finish<CR>
@@ -1222,7 +1221,7 @@ func s:GotoSourcewinOrCreateIt()
if !win_gotoid(s:sourcewin)
new
let s:sourcewin = win_getid(winnr())
- call s:InstallWinbar()
+ call s:InstallWinbar(0)
endif
endfunc
@@ -1345,7 +1344,7 @@ echomsg 'different fname: "' .. expand('%:p') .. '" vs "' .. fnamemodify(fname,
" TODO: find existing window
exe 'split ' . fnameescape(fname)
let s:sourcewin = win_getid(winnr())
- call s:InstallWinbar()
+ call s:InstallWinbar(0)
else
exe 'edit ' . fnameescape(fname)
endif