1
0
forked from aniani/vim

patch 9.0.1866: undo is synced after character find

Problem:  Undo is synced after character find.
Solution: Set no_u_sync when calling gotchars_nop().

closes: #13022
closes: #13024

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
This commit is contained in:
zeertzjq
2023-09-04 22:25:07 +02:00
committed by Christian Brabandt
parent 3170342af3
commit dccc29c228
3 changed files with 14 additions and 0 deletions

View File

@@ -862,5 +862,15 @@ func Test_undo_after_write()
call delete('Xtestfile.txt')
endfunc
func Test_undo_range_normal()
new
call setline(1, ['asa', 'bsb'])
let &l:undolevels = &l:undolevels
%normal dfs
call assert_equal(['a', 'b'], getline(1, '$'))
undo
call assert_equal(['asa', 'bsb'], getline(1, '$'))
bwipe!
endfunc
" vim: shiftwidth=2 sts=2 expandtab