aboutsummaryrefslogtreecommitdiff
path: root/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2023-01-25 18:31:31 +0000
committerJosh Rahm <joshuarahm@gmail.com>2023-01-25 18:31:31 +0000
commit9243becbedbb6a1592208051f8fa2b090dcc5e7d (patch)
tree607c2a862ec3f4399b8766383f6f8e04c4aa43b4 /runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
parent9e40b6e9e1bc67f2d856adb837ee64dd0e25b717 (diff)
parent3c48d3c83fc21dbc0841f9210f04bdb073d73cd1 (diff)
downloadrneovim-usermarks.tar.gz
rneovim-usermarks.tar.bz2
rneovim-usermarks.zip
Merge remote-tracking branch 'upstream/master' into usermarksusermarks
Diffstat (limited to 'runtime/pack/dist/opt/termdebug/plugin/termdebug.vim')
-rw-r--r--runtime/pack/dist/opt/termdebug/plugin/termdebug.vim39
1 files changed, 25 insertions, 14 deletions
diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
index 802ebd42b5..99fd7dba42 100644
--- a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
+++ b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
@@ -2,7 +2,7 @@
"
" Author: Bram Moolenaar
" Copyright: Vim license applies, see ":help license"
-" Last Change: 2022 Jun 24
+" Last Change: 2022 Nov 10
"
" WORK IN PROGRESS - The basics works stable, more to come
" Note: In general you need at least GDB 7.12 because this provides the
@@ -154,10 +154,16 @@ func s:StartDebug_internal(dict)
let s:save_columns = 0
let s:allleft = 0
- if exists('g:termdebug_wide')
- if &columns < g:termdebug_wide
+ let wide = 0
+ if exists('g:termdebug_config')
+ let wide = get(g:termdebug_config, 'wide', 0)
+ elseif exists('g:termdebug_wide')
+ let wide = g:termdebug_wide
+ endif
+ if wide > 0
+ if &columns < wide
let s:save_columns = &columns
- let &columns = g:termdebug_wide
+ let &columns = wide
" If we make the Vim window wider, use the whole left half for the debug
" windows.
let s:allleft = 1
@@ -168,7 +174,12 @@ func s:StartDebug_internal(dict)
endif
" Override using a terminal window by setting g:termdebug_use_prompt to 1.
- let use_prompt = exists('g:termdebug_use_prompt') && g:termdebug_use_prompt
+ let use_prompt = 0
+ if exists('g:termdebug_config')
+ let use_prompt = get(g:termdebug_config, 'use_prompt', 0)
+ elseif exists('g:termdebug_use_prompt')
+ let use_prompt = g:termdebug_use_prompt
+ endif
if !has('win32') && !use_prompt
let s:way = 'terminal'
else
@@ -903,7 +914,14 @@ func s:InstallCommands()
endif
if has('menu') && &mouse != ''
- call s:InstallWinbar()
+ " 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
let popup = 1
if exists('g:termdebug_config')
@@ -964,14 +982,7 @@ func s:DeleteCommands()
nunmap K
else
" call mapset(s:k_map_saved)
- let mode = s:k_map_saved.mode !=# ' ' ? s:k_map_saved.mode : ''
- call nvim_set_keymap(mode, 'K', s:k_map_saved.rhs, {
- \ 'expr': s:k_map_saved.expr ? v:true : v:false,
- \ 'noremap': s:k_map_saved.noremap ? v:true : v:false,
- \ 'nowait': s:k_map_saved.nowait ? v:true : v:false,
- \ 'script': s:k_map_saved.script ? v:true : v:false,
- \ 'silent': s:k_map_saved.silent ? v:true : v:false,
- \ })
+ call mapset('n', 0, s:k_map_saved)
endif
unlet s:k_map_saved
endif