mirror of
https://github.com/neovim/neovim.git
synced 2026-05-04 13:05:05 +00:00
vim-patch:8.1.0034: cursor not restored with ":edit #"
Problem: Cursor not restored with ":edit #".
Solution: Don't assume autocommands moved the cursor when it was moved to
the first non-blank.
adb8fbec4f
This commit is contained in:
@@ -1390,3 +1390,18 @@ func Test_edit_complete_very_long_name()
|
||||
endif
|
||||
set swapfile&
|
||||
endfunc
|
||||
|
||||
func Test_edit_alt()
|
||||
" Keeping the cursor line didn't happen when the first line has indent.
|
||||
new
|
||||
call setline(1, [' one', 'two', 'three'])
|
||||
w XAltFile
|
||||
$
|
||||
call assert_equal(3, line('.'))
|
||||
e Xother
|
||||
e #
|
||||
call assert_equal(3, line('.'))
|
||||
|
||||
bwipe XAltFile
|
||||
call delete('XAltFile')
|
||||
endfunc
|
||||
|
||||
Reference in New Issue
Block a user