diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-07-07 09:49:58 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-07 09:49:58 +0800 |
commit | 811140e276a6312775bfcf9b368de25386f7a356 (patch) | |
tree | 3db5a35e1daac65987190fb48431dc919a29cca4 /test/functional/ui | |
parent | 36941942d60915d9f78defd6aaf713a27952e16a (diff) | |
download | rneovim-811140e276a6312775bfcf9b368de25386f7a356.tar.gz rneovim-811140e276a6312775bfcf9b368de25386f7a356.tar.bz2 rneovim-811140e276a6312775bfcf9b368de25386f7a356.zip |
fix(folds): fix missing virt_lines above when fold is hidden (#24274)
Diffstat (limited to 'test/functional/ui')
-rw-r--r-- | test/functional/ui/fold_spec.lua | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/test/functional/ui/fold_spec.lua b/test/functional/ui/fold_spec.lua index 2c8455753e..d3119ccc42 100644 --- a/test/functional/ui/fold_spec.lua +++ b/test/functional/ui/fold_spec.lua @@ -2427,6 +2427,83 @@ describe("folded lines", function() {11:-- VISUAL LINE --} | ]]) end + + feed('<Esc>gg') + command('botright 1split | wincmd w') + if multigrid then + screen:expect{grid=[[ + ## grid 1 + [2:---------------------------------------------]| + [2:---------------------------------------------]| + [2:---------------------------------------------]| + [2:---------------------------------------------]| + {3:[No Name] [+] }| + [4:---------------------------------------------]| + {2:[No Name] [+] }| + [3:---------------------------------------------]| + ## grid 2 + ^line 1 | + line 2 | + virt_line below line 2 | + more virt_line below line 2 | + ## grid 3 + | + ## grid 4 + line 1 | + ]], win_viewport={ + [2] = {win = {id = 1000}, topline = 0, botline = 3, curline = 0, curcol = 0, linecount = 5, sum_scroll_delta = 0}; + [4] = {win = {id = 1001}, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 5, sum_scroll_delta = 0}; + }} + else + screen:expect([[ + ^line 1 | + line 2 | + virt_line below line 2 | + more virt_line below line 2 | + {3:[No Name] [+] }| + line 1 | + {2:[No Name] [+] }| + | + ]]) + end + + feed('<C-Y>') + if multigrid then + screen:expect{grid=[[ + ## grid 1 + [2:---------------------------------------------]| + [2:---------------------------------------------]| + [2:---------------------------------------------]| + [2:---------------------------------------------]| + {3:[No Name] [+] }| + [4:---------------------------------------------]| + {2:[No Name] [+] }| + [3:---------------------------------------------]| + ## grid 2 + virt_line above line 1 | + ^line 1 | + line 2 | + virt_line below line 2 | + ## grid 3 + | + ## grid 4 + line 1 | + ]], win_viewport={ + [2] = {win = {id = 1000}, topline = 0, botline = 3, curline = 0, curcol = 0, linecount = 5, sum_scroll_delta = -1}; + [4] = {win = {id = 1001}, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 5, sum_scroll_delta = 0}; + }} + else + screen:expect([[ + virt_line above line 1 | + ^line 1 | + line 2 | + virt_line below line 2 | + {3:[No Name] [+] }| + line 1 | + {2:[No Name] [+] }| + | + ]]) + end end) it('Folded and Visual highlights are combined #19691', function() |