{
varnumber_T n;
int error = FALSE;
+ int save_reg_executing = reg_executing;
#ifdef MESSAGE_QUEUE
// vpeekc() used to check for messages, but that caused problems, invoking
}
--no_mapping;
--allow_keys;
+ reg_executing = save_reg_executing;
set_vim_var_nr(VV_MOUSE_WIN, 0);
set_vim_var_nr(VV_MOUSE_WINID, 0);
call assert_equal('":', s:reg_stat)
" :normal command saves and restores reg_executing
+ let s:reg_stat = ''
let @q = ":call TestFunc()\<CR>:call s:save_reg_stat()\<CR>"
func TestFunc() abort
normal! ia
call assert_equal(':q', s:reg_stat)
delfunc TestFunc
+ " getchar() command saves and restores reg_executing
+ map W :call TestFunc()<CR>
+ let @q = "W"
+ func TestFunc() abort
+ let g:reg1 = reg_executing()
+ let g:typed = getchar(0)
+ let g:reg2 = reg_executing()
+ endfunc
+ call feedkeys("@qy", 'xt')
+ call assert_equal(char2nr("y"), g:typed)
+ call assert_equal('q', g:reg1)
+ call assert_equal('q', g:reg2)
+ delfunc TestFunc
+ unmap W
+ unlet g:typed
+ unlet g:reg1
+ unlet g:reg2
+
bwipe!
delfunc s:save_reg_stat
unlet s:reg_stat