diff options
| author | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-09-10 20:27:54 -0400 |
|---|---|---|
| committer | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-09-10 20:34:34 -0400 |
| commit | e1fa242a6c3a5914d31038b429338bb4f1c4ed76 (patch) | |
| tree | 37312384632fed04aabe4aa33dcf84bbaf3b8e05 /src/nvim/testdir | |
| parent | d4e6a75a0684e5cc827d0d905a67b4d0aa10b57e (diff) | |
| download | rneovim-e1fa242a6c3a5914d31038b429338bb4f1c4ed76.tar.gz rneovim-e1fa242a6c3a5914d31038b429338bb4f1c4ed76.tar.bz2 rneovim-e1fa242a6c3a5914d31038b429338bb4f1c4ed76.zip | |
vim-patch:8.1.0174: after paging up and down fold line is wrong
Problem: After paging up and down fold line is wrong.
Solution: Correct the computation of w_topline and w_botline. (Hirohito
Higashi)
https://github.com/vim/vim/commit/907dad72ef9d29422352fb74ba156e7085a3fc71
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_fold.vim | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_fold.vim b/src/nvim/testdir/test_fold.vim index e7d5a2ae2c..b6a545f959 100644 --- a/src/nvim/testdir/test_fold.vim +++ b/src/nvim/testdir/test_fold.vim @@ -1,5 +1,7 @@ " Test for folding +source view_util.vim + func PrepIndent(arg) return [a:arg] + repeat(["\t".a:arg], 5) endfu @@ -648,3 +650,27 @@ func Test_foldtext_recursive() call assert_equal(3, foldclosedend(2)) bwipe! endfunc + +func Test_fold_last_line_with_pagedown() + enew! + set fdm=manual + + let expect = '+-- 11 lines: 9---' + let content = range(1,19) + call append(0, content) + normal dd9G + normal zfG + normal zt + call assert_equal('9', getline(foldclosed('.'))) + call assert_equal('19', getline(foldclosedend('.'))) + call assert_equal(expect, ScreenLines(1, len(expect))[0]) + call feedkeys("\<C-F>", 'xt') + call assert_equal(expect, ScreenLines(1, len(expect))[0]) + call feedkeys("\<C-F>", 'xt') + call assert_equal(expect, ScreenLines(1, len(expect))[0]) + call feedkeys("\<C-B>\<C-F>\<C-F>", 'xt') + call assert_equal(expect, ScreenLines(1, len(expect))[0]) + + set fdm& + enew! +endfunc |