diff options
author | luukvbaal <luukvbaal@gmail.com> | 2025-03-27 12:51:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-27 12:51:57 +0100 |
commit | ce0c0c31a08975dd2e34207afb1a2cd544775bad (patch) | |
tree | 1a2862e5bb1777d192fd0128570f19f3e70e1d88 /test/functional/ui | |
parent | c5044bd021482c4bdcb7d2e3ff5b0e688daa681b (diff) | |
download | rneovim-ce0c0c31a08975dd2e34207afb1a2cd544775bad.tar.gz rneovim-ce0c0c31a08975dd2e34207afb1a2cd544775bad.tar.bz2 rneovim-ce0c0c31a08975dd2e34207afb1a2cd544775bad.zip |
fix(display): scroll logic does not take into account concealed topline (#33054)
Diffstat (limited to 'test/functional/ui')
-rw-r--r-- | test/functional/ui/decorations_spec.lua | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua index 639d43b560..5ef1ef54bb 100644 --- a/test/functional/ui/decorations_spec.lua +++ b/test/functional/ui/decorations_spec.lua @@ -2956,6 +2956,28 @@ describe('extmark decorations', function() {1:~ }|*3 | ]]) + -- No scrolling for concealed topline #33033 + api.nvim_buf_clear_namespace(0, ns, 0, -1) + api.nvim_buf_set_extmark(0, ns, 1, 0, { virt_lines_above = true, virt_lines = { { { "virt_above 2" } } } }) + api.nvim_buf_set_extmark(0, ns, 0, 0, { conceal_lines = "" }) + feed('ggjj') + screen:expect([[ + {2: }virt_above 2 | + {2: 2 } local text, hl_id_cell, count = unpack(ite| + {2: }m) | + {2: 3 }^ if hl_id_cell ~= nil then | + {2: 4 } hl_id = hl_id_cell | + {2: 5 }conceal text | + {2: 6 } for _ = 1, (count or 1) do | + {2: 7 } local cell = line[colpos] | + {2: 8 } cell.text = text | + {2: 9 } cell.hl_id = hl_id | + {2: 10 } colpos = colpos+1 | + {2: 11 } end | + {2: 12 }end | + {1:~ }| + | + ]]) end) end) |