Rene Kita wrote;
> If K is not mapped to anything the dictionary is empty and the if clause
> is false. K is then still mapped to :Evaluate. This will result in an
> error E492 when using K.
> ---
>
> Steps to reproduce:
> - :unmap K
> - :packadd termdebug
> - :Termdebug
> - quit
> - :map K
Thanks for the idea. One more situation to take care of: if
g_termdebug_map_K was set to zero then K wasn't mapped, thus should also
not be unmapped. This should do it:
if exists('s:k_map_saved')
if empty(s:k_map_saved)
nunmap K
else
call mapset('n', 0, s:k_map_saved)
endif
unlet s:k_map_saved
endif
--
BRIDGEKEEPER: What is your favorite colour?
GAWAIN: Blue ... No yelloooooww!
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- Br...@Moolenaar.net --
http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features --
http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language --
http://www.Zimbu.org ///
\\\ help me help AIDS victims --
http://ICCF-Holland.org ///