Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
14874:370b606be092 | 14875:081f30c50300 |
---|---|
1 " Test for folding | 1 " Test for folding |
2 | 2 |
3 source view_util.vim | 3 source view_util.vim |
4 source screendump.vim | |
4 | 5 |
5 func PrepIndent(arg) | 6 func PrepIndent(arg) |
6 return [a:arg] + repeat(["\t".a:arg], 5) | 7 return [a:arg] + repeat(["\t".a:arg], 5) |
7 endfu | 8 endfu |
8 | 9 |
672 call assert_equal(expect, ScreenLines(1, len(expect))[0]) | 673 call assert_equal(expect, ScreenLines(1, len(expect))[0]) |
673 | 674 |
674 set fdm& | 675 set fdm& |
675 enew! | 676 enew! |
676 endfunc | 677 endfunc |
678 | |
679 func Test_folds_with_rnu() | |
680 if !CanRunVimInTerminal() | |
681 return | |
682 endif | |
683 | |
684 call writefile([ | |
685 \ 'set fdm=marker rnu foldcolumn=2', | |
686 \ 'call setline(1, ["{{{1", "nline 1", "{{{1", "line 2"])', | |
687 \ ], 'Xtest_folds_with_rnu') | |
688 let buf = RunVimInTerminal('-S Xtest_folds_with_rnu', {}) | |
689 | |
690 call VerifyScreenDump(buf, 'Test_folds_with_rnu_01', {}) | |
691 call term_sendkeys(buf, "j") | |
692 call VerifyScreenDump(buf, 'Test_folds_with_rnu_02', {}) | |
693 | |
694 " clean up | |
695 call StopVimInTerminal(buf) | |
696 call delete('Xtest_folds_with_rnu') | |
697 endfunc |