Yukihiro Nakadaira wrote:

> getchar() in map-<expr> break internal state.
> 
> Steps to reproduce:
>   $ gvim -u NONE    (I tested on Windows)
>   :nnoremap <expr> x getchar()
> 
>   Then, type "x" and "<C-Space>" (any key with modifier)
> 
>   Now, all mappings does not work.
> 
> In the vgetc(), no_mapping and allow_keys are restored wrongly.
> 
> getchar.c:vgetc()
> 1633         if (mod_mask)           /* no mapping after modifier has been
> read */
> 1634         {
> 1635             ++no_mapping;
> 1636             ++allow_keys;
> 1637         }
> 1638         c = vgetorpeek(TRUE);    <- getchar() in map <expr> change
> mod_mask
> 1639         if (mod_mask)
> 1640         {
> 1641             --no_mapping;
> 1642             --allow_keys;
> 1643         }
> 
> Please check the following patch.

Thanks!


-- 
   A village.  Sound of chanting of Latin canon, punctuated by short, sharp
   cracks.  It comes nearer.  We see it is a line of MONKS ala SEVENTH SEAL
   flagellation scene, chanting and banging themselves on the foreheads with
   wooden boards.
                 "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].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui