patch 9.0.0451: virtual text "above" does not work with 'nowrap'
Problem: Virtual text "above" does not work with 'nowrap'.
Solution: Do wrap the line after. (closes #11084)
diff --git a/src/move.c b/src/move.c
index 8660d89..4b823ba 100644
--- a/src/move.c
+++ b/src/move.c
@@ -1068,6 +1068,19 @@
#endif
)
{
+#ifdef FEAT_PROP_POPUP
+ if (curwin->w_virtcol_first_char > 0)
+ {
+ int cols = (curwin->w_width - extra);
+ int rows = cols > 0 ? curwin->w_virtcol_first_char / cols : 1;
+
+ // each "above" text prop shifts the text one row down
+ curwin->w_wrow += rows;
+ curwin->w_wcol -= rows * cols;
+ endcol -= rows * cols;
+ curwin->w_cline_height = rows + 1;
+ }
+#endif
/*
* If Cursor is left of the screen, scroll rightwards.
* If Cursor is right of the screen, scroll leftwards