aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_registers.vim21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_registers.vim b/src/nvim/testdir/test_registers.vim
index c623edd5a1..b852cfd22f 100644
--- a/src/nvim/testdir/test_registers.vim
+++ b/src/nvim/testdir/test_registers.vim
@@ -690,6 +690,27 @@ func Test_record_in_select_mode()
bwipe!
endfunc
+" mapping that ends macro recording should be removed from recorded macro
+func Test_end_record_using_mapping()
+ call setline(1, 'aaa')
+ nnoremap s q
+ call feedkeys('safas', 'tx')
+ call assert_equal('fa', @a)
+ nunmap s
+
+ nnoremap xx q
+ call feedkeys('0xxafaxx', 'tx')
+ call assert_equal('fa', @a)
+ nunmap xx
+
+ nnoremap xsx q
+ call feedkeys('0qafaxsx', 'tx')
+ call assert_equal('fa', @a)
+ nunmap xsx
+
+ bwipe!
+endfunc
+
func Test_end_reg_executing()
nnoremap s <Nop>
let @a = 's'