diff src/drawline.c @ 33138:22a29cc413c5 v9.0.1851

patch 9.0.1851: breakindent missing by virt text Commit: https://github.com/vim/vim/commit/3c3cf1d6892103a1ce6bab7f3546447d85fb5d1c Author: zeertzjq <zeertzjq@outlook.com> Date: Sat Sep 2 21:55:00 2023 +0200 patch 9.0.1851: breakindent missing by virt text Problem: Virtual text at a column causes 'breakindent' and 'showbreak' to be missing (after patch 9.0.1124). Solution: Add check for "tp_col" in another place where TP_FLAG_WRAP is checked. closes: #12769 closes: #13008 closes: #13010 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
author Christian Brabandt <cb@256bit.org>
date Sat, 02 Sep 2023 22:00:07 +0200
parents 61fc08239937
children 0bb496f81ab2
line wrap: on
line diff
--- a/src/drawline.c
+++ b/src/drawline.c
@@ -2112,7 +2112,8 @@ win_line(
 							& TP_FLAG_ALIGN_RIGHT);
 			    int	    below = (tp->tp_flags
 							& TP_FLAG_ALIGN_BELOW);
-			    int	    wrap = (tp->tp_flags & TP_FLAG_WRAP);
+			    int	    wrap = tp->tp_col < MAXCOL
+					      || (tp->tp_flags & TP_FLAG_WRAP);
 			    int	    padding = tp->tp_col == MAXCOL
 						 && tp->tp_len > 1
 							  ? tp->tp_len - 1 : 0;