summaryrefslogtreecommitdiffstats
path: root/src/misc1.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-08-06 13:48:20 +0100
committerBram Moolenaar <Bram@vim.org>2022-08-06 13:48:20 +0100
commit4d91d347e65a5621621ea1e3c97dce2c677ed71d (patch)
tree3c1d98bf2b063c86b5568099208ec2fb69c151fc /src/misc1.c
parent25f40af9d2f04d18c8a276249f2794e83aa5c290 (diff)
patch 9.0.0151: a "below" aligned text property does not work with 'nowrap'v9.0.0151
Problem: A "below" aligned text property does not work with 'nowrap'. Solution: Start a new screen line to display the virtual text. (closes #10851)
Diffstat (limited to 'src/misc1.c')
-rw-r--r--src/misc1.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/misc1.c b/src/misc1.c
index 76ac88e8d6..f3d90f876d 100644
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -364,9 +364,6 @@ plines_win_nofill(
#endif
int lines;
- if (!wp->w_p_wrap)
- return 1;
-
if (wp->w_width == 0)
return 1;
@@ -377,7 +374,16 @@ plines_win_nofill(
return 1;
#endif
- lines = plines_win_nofold(wp, lnum);
+ if (!wp->w_p_wrap)
+ lines = 1
+#ifdef FEAT_PROP_POPUP
+ // add a line for each "below" aligned text property
+ + prop_count_below(wp->w_buffer, lnum)
+#endif
+ ;
+ else
+ lines = plines_win_nofold(wp, lnum);
+
if (winheight > 0 && lines > wp->w_height)
return wp->w_height;
return lines;