On Mon, Dec 07, 2020 at 06:54:41PM +0100, Bram Moolenaar wrote:
> 
> 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.
> 
> 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

This is obviously the correct solution - consider my patch a bug report.

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20201208161332.GA4919%40t480.

Raspunde prin e-mail lui