aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-11-16 03:34:25 -0500
committerJustin M. Keyes <justinkz@gmail.com>2019-11-16 00:34:25 -0800
commitd79164c9f9ffbb17b82b3a523e217e61f43697be (patch)
tree689e1d515da7eda3f2676aecb417c7ab1f6287c1 /src/nvim/testdir
parente3b08a0fc43eef91b51f8166a036e86b5bdf5613 (diff)
downloadrneovim-d79164c9f9ffbb17b82b3a523e217e61f43697be.tar.gz
rneovim-d79164c9f9ffbb17b82b3a523e217e61f43697be.tar.bz2
rneovim-d79164c9f9ffbb17b82b3a523e217e61f43697be.zip
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) https://github.com/vim/vim/commit/cce713ddcc0c9ab29926c28e287cbb587a959b08
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_functions.vim7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_functions.vim b/src/nvim/testdir/test_functions.vim
index a36c51f56f..7822507f86 100644
--- a/src/nvim/testdir/test_functions.vim
+++ b/src/nvim/testdir/test_functions.vim
@@ -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>