comparison 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
comparison
equal deleted inserted replaced
33137:7e45a1650e58 33138:22a29cc413c5
2110 { 2110 {
2111 int right = (tp->tp_flags 2111 int right = (tp->tp_flags
2112 & TP_FLAG_ALIGN_RIGHT); 2112 & TP_FLAG_ALIGN_RIGHT);
2113 int below = (tp->tp_flags 2113 int below = (tp->tp_flags
2114 & TP_FLAG_ALIGN_BELOW); 2114 & TP_FLAG_ALIGN_BELOW);
2115 int wrap = (tp->tp_flags & TP_FLAG_WRAP); 2115 int wrap = tp->tp_col < MAXCOL
2116 || (tp->tp_flags & TP_FLAG_WRAP);
2116 int padding = tp->tp_col == MAXCOL 2117 int padding = tp->tp_col == MAXCOL
2117 && tp->tp_len > 1 2118 && tp->tp_len > 1
2118 ? tp->tp_len - 1 : 0; 2119 ? tp->tp_len - 1 : 0;
2119 2120
2120 // Insert virtual text before the current 2121 // Insert virtual text before the current