0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

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)
This commit is contained in:
Bram Moolenaar
2022-09-12 17:51:07 +01:00
parent 7b2d87220c
commit c9dc03fff5
8 changed files with 50 additions and 13 deletions

View File

@@ -1068,6 +1068,19 @@ curs_columns(
#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