Mercurial > vim
diff src/testdir/test_fold.vim @ 14875:081f30c50300 v8.1.0449
patch 8.1.0449: when 'rnu' is set folded lines are not displayed correctly
commit https://github.com/vim/vim/commit/7701f308565fdc7b5096a6597d9c3b63de0bbcec
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Oct 2 21:20:32 2018 +0200
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)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 02 Oct 2018 21:30:06 +0200 |
parents | 1bc96dbb5498 |
children | 6e9f37bf987b |
line wrap: on
line diff
--- 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 @@ func Test_fold_last_line_with_pagedown() 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