vim-patch:8.1.1077: reg_executing() is reset by calling input()

Problem:    reg_executing() is reset by calling input().
Solution:   Implement a more generic way to save and restore reg_executing.
            (Ozaki Kiichi, closes vim/vim#4192)
9a2c091a74
This commit is contained in:
Jan Edmund Lazo
2019-05-26 20:56:33 -04:00
parent 2393611588
commit b2a11515b2
3 changed files with 26 additions and 8 deletions

View File

@@ -9673,7 +9673,6 @@ static void f_getchar(typval_T *argvars, typval_T *rettv, FunPtr fptr)
{
varnumber_T n;
bool error = false;
const int save_reg_executing = reg_executing;
no_mapping++;
for (;; ) {
@@ -9710,7 +9709,6 @@ static void f_getchar(typval_T *argvars, typval_T *rettv, FunPtr fptr)
break;
}
no_mapping--;
reg_executing = save_reg_executing;
vimvars[VV_MOUSE_WIN].vv_nr = 0;
vimvars[VV_MOUSE_WINID].vv_nr = 0;