Mercurial > vim
diff src/testdir/test_registers.vim @ 33984:82e8284e60b7 v9.0.2178
patch 9.0.2178: reg_executing() wrong for :normal with range
Commit: https://github.com/vim/vim/commit/615202bd0ebc1d8e3532f24b9b7232c2fd86b181
Author: zeertzjq <zeertzjq@outlook.com>
Date: Tue Dec 19 20:35:40 2023 +0100
patch 9.0.2178: reg_executing() wrong for :normal with range
Problem: reg_executing() returns wrong result in :normal with range
when 'showcmd' is set (after 8.2.4705).
Solution: Reset "pending_end_reg_executing" when executing a register.
closes: #13707
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 19 Dec 2023 20:45:03 +0100 |
parents | dfaddd6f039e |
children | 429644dfc975 |
line wrap: on
line diff
--- a/src/testdir/test_registers.vim +++ b/src/testdir/test_registers.vim @@ -840,6 +840,23 @@ func Test_end_reg_executing() bwipe! endfunc +func Test_reg_executing_in_range_normal() + new + set showcmd + call setline(1, range(10)) + let g:log = [] + nnoremap s <Cmd>let g:log += [reg_executing()]<CR> + let @r = 's' + + %normal @r + call assert_equal(repeat(['r'], 10), g:log) + + nunmap s + unlet g:log + set showcmd& + bwipe! +endfunc + " An operator-pending mode mapping shouldn't be applied to keys typed in " Insert mode immediately after a character search when replaying. func Test_replay_charsearch_omap()