aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_diffmode.vim
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-07-17 21:20:56 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-08-02 12:00:00 -0400
commited41ac08cff396a52bf2bd2eef83205c55b079ba (patch)
treebc8482b05a568f181084b003d8c1040a420cbc1e /src/nvim/testdir/test_diffmode.vim
parent1e6bf6f17a79ccc3a1fc752088f7e3c2024e78cf (diff)
downloadrneovim-ed41ac08cff396a52bf2bd2eef83205c55b079ba.tar.gz
rneovim-ed41ac08cff396a52bf2bd2eef83205c55b079ba.tar.bz2
rneovim-ed41ac08cff396a52bf2bd2eef83205c55b079ba.zip
vim-patch:8.2.1004: line numbers below filler lines not always updated
Problem: Line numbers below filler lines not always updated. Solution: Don't break out of the win_line() loop too early. (Christian Brabandt, closes vim/vim#6294, closes vim/vim#6138) https://github.com/vim/vim/commit/511feec6f0a9e954f1d7353425fa51232b1a8e88
Diffstat (limited to 'src/nvim/testdir/test_diffmode.vim')
-rw-r--r--src/nvim/testdir/test_diffmode.vim29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_diffmode.vim b/src/nvim/testdir/test_diffmode.vim
index 49bbe84869..a1f1dd3bab 100644
--- a/src/nvim/testdir/test_diffmode.vim
+++ b/src/nvim/testdir/test_diffmode.vim
@@ -1,6 +1,7 @@
" Tests for diff mode
source shared.vim
source screendump.vim
+source check.vim
func Test_diff_fold_sync()
enew!
@@ -801,6 +802,34 @@ func Test_diff_closeoff()
enew!
endfunc
+func Test_diff_rnu()
+ CheckScreendump
+
+ let content =<< trim END
+ call setline(1, ['a', 'a', 'a', 'y', 'b', 'b', 'b', 'b', 'b'])
+ vnew
+ call setline(1, ['a', 'a', 'a', 'x', 'x', 'x', 'b', 'b', 'b', 'b', 'b'])
+ call setline(1, ['a', 'a', 'a', 'y', 'b', 'b', 'b', 'b', 'b'])
+ vnew
+ call setline(1, ['a', 'a', 'a', 'x', 'x', 'x', 'b', 'b', 'b', 'b', 'b'])
+ windo diffthis
+ setlocal number rnu foldcolumn=0
+ END
+ call writefile(content, 'Xtest_diff_rnu')
+ let buf = RunVimInTerminal('-S Xtest_diff_rnu', {})
+
+ call VerifyScreenDump(buf, 'Test_diff_rnu_01', {})
+
+ call term_sendkeys(buf, "j")
+ call VerifyScreenDump(buf, 'Test_diff_rnu_02', {})
+ call term_sendkeys(buf, "j")
+ call VerifyScreenDump(buf, 'Test_diff_rnu_03', {})
+
+ " clean up
+ call StopVimInTerminal(buf)
+ call delete('Xtest_diff_rnu')
+endfunc
+
func Test_diff_and_scroll()
" this was causing an ml_get error
set ls=2