fix(extmarks): problems with folded virtual lines (#21930)

Problem:    When a folded line has virtual lines attached, the following
            problems occur:
              - The virtual lines are drawn empty.
              - The 'foldtext' line is drawn empty.
              - The cursor is drawn incorrectly.
Solution:   Check whether virtual lines belong to a folded line.

Fix #17027
Fix #19557
Fix #21837

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
This commit is contained in:
luukvbaal
2023-01-23 00:43:04 +01:00
committed by GitHub
parent 0f633ff494
commit 323ea17a19
6 changed files with 139 additions and 11 deletions

View File

@@ -51,7 +51,7 @@ int plines_win(win_T *wp, linenr_T lnum, bool winheight)
/// @return Number of filler lines above lnum
int win_get_fill(win_T *wp, linenr_T lnum)
{
int virt_lines = decor_virt_lines(wp, lnum, NULL);
int virt_lines = decor_virt_lines(wp, lnum, NULL, kNone);
// be quick when there are no filler lines
if (diffopt_filler()) {