vim-patch:9.0.1866: undo is synced after character find (#25021)

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: vim/vim#13022
closes: vim/vim#13024

dccc29c228
This commit is contained in:
zeertzjq
2023-09-05 06:25:51 +08:00
committed by GitHub
parent cf7d37ad13
commit 65d3378009
2 changed files with 13 additions and 1 deletions

View File

@@ -870,5 +870,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