diff options
| author | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-09-11 19:08:35 -0400 |
|---|---|---|
| committer | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-09-11 19:23:04 -0400 |
| commit | a021b30edef84bb6fbdbf0b9e045148eb1d20396 (patch) | |
| tree | 00948336ada2a8ac915c5e71705372fffd429fed /src/nvim/testdir | |
| parent | 61df24b9982c26c068e5fafbc79fd059a067d998 (diff) | |
| download | rneovim-a021b30edef84bb6fbdbf0b9e045148eb1d20396.tar.gz rneovim-a021b30edef84bb6fbdbf0b9e045148eb1d20396.tar.bz2 rneovim-a021b30edef84bb6fbdbf0b9e045148eb1d20396.zip | |
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.
https://github.com/vim/vim/commit/adb8fbec4f4059d214fe6acf2485ffd35e803450
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_edit.vim | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_edit.vim b/src/nvim/testdir/test_edit.vim index 1effc8e12f..989adfce8f 100644 --- a/src/nvim/testdir/test_edit.vim +++ b/src/nvim/testdir/test_edit.vim @@ -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 |