mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
updated for version 7.3.338
Problem: Using getchar() in an expression mapping doesn't work well. Solution: Don't save and restore the typeahead. (James Vega)
This commit is contained in:
parent
2e7b1df8fa
commit
b3479bd229
@ -2460,18 +2460,13 @@ vgetorpeek(advance)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Handle ":map <expr>": evaluate the {rhs} as an
|
* Handle ":map <expr>": evaluate the {rhs} as an
|
||||||
* expression. Save and restore the typeahead so that
|
* expression. Also save and restore the command line
|
||||||
* getchar() can be used. Also save and restore the
|
* for "normal :".
|
||||||
* command line for "normal :".
|
|
||||||
*/
|
*/
|
||||||
if (mp->m_expr)
|
if (mp->m_expr)
|
||||||
{
|
{
|
||||||
tasave_T tabuf;
|
|
||||||
int save_vgetc_busy = vgetc_busy;
|
int save_vgetc_busy = vgetc_busy;
|
||||||
|
|
||||||
save_typeahead(&tabuf);
|
|
||||||
if (tabuf.typebuf_valid)
|
|
||||||
{
|
|
||||||
vgetc_busy = 0;
|
vgetc_busy = 0;
|
||||||
save_m_keys = vim_strsave(mp->m_keys);
|
save_m_keys = vim_strsave(mp->m_keys);
|
||||||
save_m_str = vim_strsave(mp->m_str);
|
save_m_str = vim_strsave(mp->m_str);
|
||||||
@ -2479,10 +2474,6 @@ vgetorpeek(advance)
|
|||||||
vgetc_busy = save_vgetc_busy;
|
vgetc_busy = save_vgetc_busy;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
s = NULL;
|
|
||||||
restore_typeahead(&tabuf);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif
|
#endif
|
||||||
s = mp->m_str;
|
s = mp->m_str;
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
xxx4asdf fail nop ok 9 333
|
xxx4asdf fail nop ok 9 333
|
||||||
XX111XX
|
XX111-XX
|
||||||
---222---
|
---222---
|
||||||
1. one
|
1. one
|
||||||
2. two
|
2. two
|
||||||
|
@ -709,6 +709,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
338,
|
||||||
/**/
|
/**/
|
||||||
337,
|
337,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user