mirror of
https://github.com/neovim/neovim.git
synced 2025-10-09 19:36:40 +00:00
vim-patch:8.1.0992: :normal resets reg_executing() result #11398
Problem: A :normal command while executing a register resets the
reg_executing() result.
Solution: Save and restore reg_executing. (closes vim/vim#4066)
cce713ddcc
This commit is contained in:

committed by
Justin M. Keyes

parent
e3b08a0fc4
commit
d79164c9f9
@@ -1132,6 +1132,13 @@ func Test_reg_executing_and_recording()
|
||||
|
||||
" :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
|
||||
endfunc
|
||||
call feedkeys("@q", 'xt')
|
||||
call assert_equal(':q', s:reg_stat)
|
||||
delfunc TestFunc
|
||||
|
||||
" getchar() command saves and restores reg_executing
|
||||
map W :call TestFunc()<CR>
|
||||
|
Reference in New Issue
Block a user