patch 7.4.2109
Problem: Setting 'display' to "lastline" is a drastic change, while
omitting it results in lots of "@" lines.
Solution: Add "truncate" to show "@@@" for a truncated line.
diff --git a/src/screen.c b/src/screen.c
index 1b364a4..b16bd87 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -2018,7 +2018,7 @@
&& wp->w_lines[idx].wl_valid
&& wp->w_lines[idx].wl_lnum == lnum
&& lnum > wp->w_topline
- && !(dy_flags & DY_LASTLINE)
+ && !(dy_flags & (DY_LASTLINE | DY_TRUNCATE))
&& srow + wp->w_lines[idx].wl_size > wp->w_height
#ifdef FEAT_DIFF
&& diff_check_fill(wp, lnum) == 0
@@ -2139,6 +2139,21 @@
wp->w_filler_rows = wp->w_height - srow;
}
#endif
+ else if (dy_flags & DY_TRUNCATE) /* 'display' has "truncate" */
+ {
+ int scr_row = W_WINROW(wp) + wp->w_height - 1;
+
+ /*
+ * Last line isn't finished: Display "@@@" in the last screen line.
+ */
+ screen_puts_len((char_u *)"@@", 2, scr_row, W_WINCOL(wp),
+ hl_attr(HLF_AT));
+ screen_fill(scr_row, scr_row + 1,
+ (int)W_WINCOL(wp) + 2, (int)W_ENDCOL(wp),
+ '@', ' ', hl_attr(HLF_AT));
+ set_empty_rows(wp, srow);
+ wp->w_botline = lnum;
+ }
else if (dy_flags & DY_LASTLINE) /* 'display' has "lastline" */
{
/*