1
0
forked from aniani/vim

patch 8.2.3644: count for 'operatorfunc' in Visual mode is not redone

Problem:    Count for 'operatorfunc' in Visual mode is not redone.
Solution:   Add the count to the redo buffer. (closes #9174)
This commit is contained in:
Bram Moolenaar
2021-11-22 14:16:08 +00:00
parent a3f83feb63
commit 2228cd72cf
5 changed files with 58 additions and 9 deletions

View File

@@ -363,7 +363,7 @@ func Test_normal08_fold()
bw!
endfunc
func Test_normal09_operatorfunc()
func Test_normal09a_operatorfunc()
" Test operatorfunc
call Setup_NewWindow()
" Add some spaces for counting
@@ -457,7 +457,7 @@ func Test_normal09_operatorfunc()
bw!
endfunc
func Test_normal09a_operatorfunc()
func Test_normal09b_operatorfunc()
" Test operatorfunc
call Setup_NewWindow()
" Add some spaces for counting
@@ -484,6 +484,26 @@ func Test_normal09a_operatorfunc()
unlet! g:opt
endfunc
func OperatorfuncRedo(_)
let g:opfunc_count = v:count
endfunc
func Test_normal09c_operatorfunc()
" Test redoing operatorfunc
new
call setline(1, 'some text')
set operatorfunc=OperatorfuncRedo
normal v3g@
call assert_equal(3, g:opfunc_count)
let g:opfunc_count = 0
normal .
call assert_equal(3, g:opfunc_count)
bw!
unlet g:opfunc_count
set operatorfunc=
endfunc
func Test_normal10_expand()
" Test for expand()
10new