diff options
| author | ckelsel <ckelsel@hotmail.com> | 2018-01-15 20:08:37 +0800 |
|---|---|---|
| committer | ckelsel <ckelsel@hotmail.com> | 2018-01-15 20:20:15 +0800 |
| commit | 808f5043055f9bd2f083befc0d50f00b0ffb5c25 (patch) | |
| tree | 73a82c06f9d8f1d8303def016b2c68e9260f2c70 /src/nvim/testdir/test_diffmode.vim | |
| parent | 28998cfd815abd690ffa0b9bab786263af619008 (diff) | |
| download | rneovim-808f5043055f9bd2f083befc0d50f00b0ffb5c25.tar.gz rneovim-808f5043055f9bd2f083befc0d50f00b0ffb5c25.tar.bz2 rneovim-808f5043055f9bd2f083befc0d50f00b0ffb5c25.zip | |
vim-patch:8.0.0421: diff mode wrong when adding line at end of buffer
Problem: Diff mode is displayed wrong when adding a line at the end of a
buffer.
Solution: Adjust marks in diff mode. (James McCoy, closes vim/vim#1329)
https://github.com/vim/vim/commit/f58a8475e17bd566760fc7e2a17d35ddf4edacf2
Diffstat (limited to 'src/nvim/testdir/test_diffmode.vim')
| -rw-r--r-- | src/nvim/testdir/test_diffmode.vim | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_diffmode.vim b/src/nvim/testdir/test_diffmode.vim index 8ee82bd538..88f73cdb5b 100644 --- a/src/nvim/testdir/test_diffmode.vim +++ b/src/nvim/testdir/test_diffmode.vim @@ -272,3 +272,23 @@ func Test_setting_cursor() call delete('Xtest1') call delete('Xtest2') endfunc + +func Test_diff_lastline() + enew! + only! + call setline(1, ['This is a ', 'line with five ', 'rows']) + diffthis + botright vert new + call setline(1, ['This is', 'a line with ', 'four rows']) + diffthis + 1 + call feedkeys("Je a\<CR>", 'tx') + call feedkeys("Je a\<CR>", 'tx') + let w1lines = winline() + wincmd w + $ + let w2lines = winline() + call assert_equal(w2lines, w1lines) + bwipe! + bwipe! +endfunc |