summaryrefslogtreecommitdiffstats
path: root/runtime/pack
diff options
context:
space:
mode:
authorUbaldo Tiberi <ubaldo.tiberi@google.com>2024-06-19 19:50:32 +0200
committerChristian Brabandt <cb@256bit.org>2024-06-19 19:50:32 +0200
commit46f2823807741ac91c51cf36ddabf293db26ab41 (patch)
treeddb19c283536ddf88cf58b65f766a118339815f0 /runtime/pack
parentaeca7176f3b7bdc2d698938062f6cad802fea783 (diff)
patch 9.1.0501: too complicated mapping restore in termdebugv9.1.0501
Problem: too complicated mapping restore in termdebug Solution: simplify unmapping logic, add a few more tests (Ubaldo Tiberi) closes: #15046 Signed-off-by: Ubaldo Tiberi <ubaldo.tiberi@google.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'runtime/pack')
-rw-r--r--runtime/pack/dist/opt/termdebug/plugin/termdebug.vim16
1 files changed, 4 insertions, 12 deletions
diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
index 4e48ab6890..d00cdded21 100644
--- a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
+++ b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
@@ -1224,33 +1224,25 @@ def DeleteCommands()
delcommand Winbar
- if !empty(saved_K_map) && saved_K_map.buffer
- # pass
- elseif !empty(saved_K_map) && !saved_K_map.buffer
- nunmap K
+ if !empty(saved_K_map) && !saved_K_map.buffer
mapset(saved_K_map)
elseif empty(saved_K_map)
silent! nunmap K
endif
- if !empty(saved_plus_map) && saved_plus_map.buffer
- # pass
- elseif !empty(saved_plus_map) && !saved_plus_map.buffer
- nunmap +
+ if !empty(saved_plus_map) && !saved_plus_map.buffer
mapset(saved_plus_map)
elseif empty(saved_plus_map)
silent! nunmap +
endif
- if !empty(saved_minus_map) && saved_minus_map.buffer
- # pass
- elseif !empty(saved_minus_map) && !saved_minus_map.buffer
- nunmap -
+ if !empty(saved_minus_map) && !saved_minus_map.buffer
mapset(saved_minus_map)
elseif empty(saved_minus_map)
silent! nunmap -
endif
+
if has('menu')
# Remove the WinBar entries from all windows where it was added.
var curwinid = win_getid()