forked from aniani/vim
patch 9.1.0501: too complicated mapping restore in termdebug
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>
This commit is contained in:
committed by
Christian Brabandt
parent
aeca7176f3
commit
46f2823807
@@ -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()
|
||||
|
Reference in New Issue
Block a user