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:
13
src/move.c
13
src/move.c
@@ -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
|
||||
|
Reference in New Issue
Block a user