patch 8.1.0449: when 'rnu' is set folded lines are not displayed correctly
Problem: When 'rnu' is set folded lines are not displayed correctly.
(Vitaly Yashin)
Solution: When only redrawing line numbers do draw folded lines.
(closes #3484)
diff --git a/src/testdir/test_fold.vim b/src/testdir/test_fold.vim
index df4b12c..0384b4f 100644
--- a/src/testdir/test_fold.vim
+++ b/src/testdir/test_fold.vim
@@ -1,6 +1,7 @@
" Test for folding
source view_util.vim
+source screendump.vim
func PrepIndent(arg)
return [a:arg] + repeat(["\t".a:arg], 5)
@@ -674,3 +675,23 @@
set fdm&
enew!
endfunc
+
+func Test_folds_with_rnu()
+ if !CanRunVimInTerminal()
+ return
+ endif
+
+ call writefile([
+ \ 'set fdm=marker rnu foldcolumn=2',
+ \ 'call setline(1, ["{{{1", "nline 1", "{{{1", "line 2"])',
+ \ ], 'Xtest_folds_with_rnu')
+ let buf = RunVimInTerminal('-S Xtest_folds_with_rnu', {})
+
+ call VerifyScreenDump(buf, 'Test_folds_with_rnu_01', {})
+ call term_sendkeys(buf, "j")
+ call VerifyScreenDump(buf, 'Test_folds_with_rnu_02', {})
+
+ " clean up
+ call StopVimInTerminal(buf)
+ call delete('Xtest_folds_with_rnu')
+endfunc