patch 9.0.1305: cursor in wrong line with virtual text above
Problem: Cursor in wrong line with virtual text above.
Solution: Count extra line for text property above/below. (closes #11959)
diff --git a/src/charset.c b/src/charset.c
index ebec2cf..3ce95c7 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -813,6 +813,11 @@
{
(void)win_lbr_chartabsize(cts, NULL);
cts->cts_vcol += cts->cts_cur_text_width;
+
+ // when properties are above or below the empty line must also be
+ // counted
+ if (cts->cts_prop_lines > 0)
+ ++cts->cts_vcol;
}
#endif
}
@@ -1217,6 +1222,10 @@
tab_size = win_chartabsize(wp, s, vcol + size);
size += tab_size;
}
+ if (tp->tp_col == MAXCOL && (tp->tp_flags
+ & (TP_FLAG_ALIGN_ABOVE | TP_FLAG_ALIGN_BELOW)))
+ // count extra line for property above/below
+ ++cts->cts_prop_lines;
}
}
if (tp->tp_col != MAXCOL && tp->tp_col - 1 > col)