Skip to content

Commit 6528d9f

Browse files
committed
Add a workaround to pass tests
1 parent c4512a0 commit 6528d9f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

t/register-designations.vim

+9
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,15 @@ call vspec#customize_matcher('to_use_register', ToUseRegister)
2222
describe 'operator#user#define'
2323
before
2424
new
25+
26+
" Reset v:register to '"' for ease of testing.
27+
"
28+
" Unfortunately, v:register is not reset after executing each operator.
29+
" But it is reset after executing non-operator command such as h, j, etc.
30+
" So that 'operatorfunc' might use a wrong v:register value. Suppose that
31+
" user types `"ayyg@g@`, v:register should contain '"', but it actually
32+
" contains 'a'. The same can be said for `"ayyddg@g@`.
33+
normal! ""Y
2534
end
2635

2736
after

0 commit comments

Comments
 (0)