0
0
mirror of https://github.com/vim/vim.git synced 2025-10-04 05:25:06 -04:00

patch 8.1.0992: a :normal command resets the reg_executing() result

Problem:    A :normal command while executing a register resets the
            reg_executing() result.
Solution:   Save and restore reg_executing. (closes #4066)
This commit is contained in:
Bram Moolenaar
2019-03-04 11:40:12 +01:00
parent 975880b6e6
commit cce713ddcc
4 changed files with 25 additions and 11 deletions

View File

@@ -1137,6 +1137,15 @@ func Test_reg_executing_and_recording()
call feedkeys("q\"\"=s:save_reg_stat()\<CR>pq", 'xt')
call assert_equal('":', s:reg_stat)
" :normal command saves and restores reg_executing
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
bwipe!
delfunc s:save_reg_stat
unlet s:reg_stat