summaryrefslogtreecommitdiff
path: root/src/testdir/test_diffmode.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-03-05 18:03:04 +0100
committerBram Moolenaar <Bram@vim.org>2017-03-05 18:03:04 +0100
commitf58a8475e17bd566760fc7e2a17d35ddf4edacf2 (patch)
tree67c22d82f4c544570688023e34f3e51f5d65e2c7 /src/testdir/test_diffmode.vim
parent2c7292dc5bbf155fe2192d417363b8c085759cad (diff)
downloadvim-git-f58a8475e17bd566760fc7e2a17d35ddf4edacf2.tar.gz
patch 8.0.0421: diff mode wrong when adding line at end of bufferv8.0.0421
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 #1329)
Diffstat (limited to 'src/testdir/test_diffmode.vim')
-rw-r--r--src/testdir/test_diffmode.vim20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/testdir/test_diffmode.vim b/src/testdir/test_diffmode.vim
index c3d4be9cf..33617c9cb 100644
--- a/src/testdir/test_diffmode.vim
+++ b/src/testdir/test_diffmode.vim
@@ -347,3 +347,23 @@ func Test_diff_nomodifiable()
call assert_fails('norm do', 'E21:')
%bwipe!
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