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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user