Patch 7.4.870
Problem: May get into an invalid state when using getchar() in an
expression mapping.
Solution: Anticipate mod_mask to change. (idea by Yukihiro Nakadaira)
Files: src/getchar.c
*** ../vim-7.4.869/src/getchar.c 2015-09-15 14:12:01.378632565 +0200
--- src/getchar.c 2015-09-15 18:17:50.192261837 +0200
***************
*** 1630,1642 ****
last_recorded_len = 0;
for (;;) /* this is done twice if there are
modifiers */
{
if (mod_mask) /* no mapping after modifier has been read */
{
++no_mapping;
++allow_keys;
}
c = vgetorpeek(TRUE);
! if (mod_mask)
{
--no_mapping;
--allow_keys;
--- 1630,1645 ----
last_recorded_len = 0;
for (;;) /* this is done twice if there are
modifiers */
{
+ int did_inc = FALSE;
+
if (mod_mask) /* no mapping after modifier has been read */
{
++no_mapping;
++allow_keys;
+ did_inc = TRUE; /* mod_mask may change value */
}
c = vgetorpeek(TRUE);
! if (did_inc)
{
--no_mapping;
--allow_keys;
*** ../vim-7.4.869/src/version.c 2015-09-15 17:58:22.760394656 +0200
--- src/version.c 2015-09-15 18:15:46.745544634 +0200
***************
*** 743,744 ****
--- 743,746 ----
{ /* Add new patch number below this line */
+ /**/
+ 870,
/**/
--
I once paid $12 to peer at the box that held King Tutankhamen's little
bandage-covered midget corpse at the De Young Museum in San Francisco. I
remember thinking how pleased he'd be about the way things turned out in his
afterlife.
(Scott Adams - The Dilbert principle)
/// 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.