0
0
mirror of https://github.com/vim/vim.git synced 2025-10-18 07:54:29 -04:00

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.
This commit is contained in:
Bram Moolenaar
2018-06-04 20:34:23 +02:00
parent acb9effecc
commit adb8fbec4f
3 changed files with 26 additions and 3 deletions

View File

@@ -1387,3 +1387,17 @@ func Test_edit_quit()
only
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