mirror of
https://github.com/neovim/neovim.git
synced 2026-01-04 18:37:02 +10:00
vim-patch:9.1.2037: undo: cursor position not correctly restored (#37195)
Problem: undo: cursor position not correctly restored
Solution: Do not override the saved cursor position (altermo)
closes: vim/vim#19052
a722da29c1
Co-authored-by: altermo <107814000+altermo@users.noreply.github.com>
This commit is contained in:
@@ -911,5 +911,16 @@ func Test_load_existing_undofile()
|
||||
bw!
|
||||
endfunc
|
||||
|
||||
func Test_restore_cursor_position_after_undo()
|
||||
CheckFeature persistent_undo
|
||||
sp samples/test_undo.txt
|
||||
|
||||
3 | exe "norm! gqk" | undojoin | 1 delete
|
||||
call assert_equal(1, line('.'))
|
||||
norm! u
|
||||
call assert_equal(3, line('.'))
|
||||
bw!
|
||||
endfunc
|
||||
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
||||
Reference in New Issue
Block a user