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 -- [email protected] -- 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    ///

-- 
-- 
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/202012071754.0B7HsfwA1418678%40masaka.moolenaar.net.

Raspunde prin e-mail lui