aboutsummaryrefslogtreecommitdiff
path: root/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/pack/dist/opt/termdebug/plugin/termdebug.vim')
-rw-r--r--runtime/pack/dist/opt/termdebug/plugin/termdebug.vim13
1 files changed, 9 insertions, 4 deletions
diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
index 99819c93ea..41d59c39d9 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: 2020 Feb 19
+" Last Change: 2020 May 22
"
" WORK IN PROGRESS - Only the basics work
" Note: On MS-Windows you need a recent version of gdb. The one included with
@@ -758,8 +758,10 @@ func s:InstallCommands()
command Asm call s:GotoAsmwinOrCreateIt()
command Winbar call s:InstallWinbar()
- " TODO: can the K mapping be restored?
- nnoremap K :Evaluate<CR>
+ if !exists('g:termdebug_map_K') || g:termdebug_map_K
+ let s:k_map_saved = maparg('K', 'n', 0, 1)
+ nnoremap K :Evaluate<CR>
+ endif
let &cpo = save_cpo
endfunc
@@ -797,7 +799,10 @@ func s:DeleteCommands()
delcommand Asm
delcommand Winbar
- nunmap K
+ if exists('s:k_map_saved')
+ call mapset('n', 0, s:k_map_saved)
+ unlet s:k_map_saved
+ endif
exe 'sign unplace ' . s:pc_id
for [id, entries] in items(s:breakpoints)