comparison src/drawline.c @ 33248:0bb496f81ab2 v9.0.1896

patch 9.0.1896: "below" virtual text doesn't work with 'rightleft' Commit: https://github.com/vim/vim/commit/6b9c2025496e415856ad70b819de83a48267c582 Author: zeertzjq <zeertzjq@outlook.com> Date: Mon Sep 11 20:01:17 2023 +0200 patch 9.0.1896: "below" virtual text doesn't work with 'rightleft' Problem: "below" virtual text doesn't work with 'rightleft'. Solution: Use column from right border with 'rightleft'. closes: #13071 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
author Christian Brabandt <cb@256bit.org>
date Mon, 11 Sep 2023 20:15:04 +0200
parents 22a29cc413c5
children a2dfcbbfc301
comparison
equal deleted inserted replaced
33247:3ba31a65248f 33248:0bb496f81ab2
2009 ++text_prop_next; 2009 ++text_prop_next;
2010 } 2010 }
2011 2011
2012 if (wlv.n_extra == 0 || 2012 if (wlv.n_extra == 0 ||
2013 (!wlv.extra_for_textprop 2013 (!wlv.extra_for_textprop
2014 #ifdef FEAT_PROP_POPUP
2015 && !(text_prop_type != NULL && 2014 && !(text_prop_type != NULL &&
2016 text_prop_flags & PT_FLAG_OVERRIDE) 2015 text_prop_flags & PT_FLAG_OVERRIDE)
2017 #endif
2018 )) 2016 ))
2019 { 2017 {
2020 text_prop_attr = 0; 2018 text_prop_attr = 0;
2021 text_prop_attr_comb = 0; 2019 text_prop_attr_comb = 0;
2022 text_prop_flags = 0; 2020 text_prop_flags = 0;
2132 text_prop_attr = 0; 2130 text_prop_attr = 0;
2133 text_prop_attr_comb = 0; 2131 text_prop_attr_comb = 0;
2134 if (*ptr == NUL) 2132 if (*ptr == NUL)
2135 // don't combine char attr after EOL 2133 // don't combine char attr after EOL
2136 text_prop_flags &= ~PT_FLAG_COMBINE; 2134 text_prop_flags &= ~PT_FLAG_COMBINE;
2137 #ifdef FEAT_LINEBREAK 2135 # ifdef FEAT_LINEBREAK
2138 if (above || below || right || !wrap) 2136 if (above || below || right || !wrap)
2139 { 2137 {
2140 // no 'showbreak' before "below" text property 2138 // no 'showbreak' before "below" text property
2141 // or after "above" or "right" text property 2139 // or after "above" or "right" text property
2142 wlv.need_showbreak = FALSE; 2140 wlv.need_showbreak = FALSE;
2143 wlv.dont_use_showbreak = TRUE; 2141 wlv.dont_use_showbreak = TRUE;
2144 } 2142 }
2145 #endif 2143 # endif
2146 if ((right || above || below || !wrap 2144 if ((right || above || below || !wrap
2147 || padding > 0) && wp->w_width > 2) 2145 || padding > 0) && wp->w_width > 2)
2148 { 2146 {
2149 char_u *prev_p_extra = wlv.p_extra; 2147 char_u *prev_p_extra = wlv.p_extra;
2150 int start_line; 2148 int start_line;
2153 // truncation. 2151 // truncation.
2154 // Shared with win_lbr_chartabsize(), must do 2152 // Shared with win_lbr_chartabsize(), must do
2155 // exactly the same. 2153 // exactly the same.
2156 start_line = text_prop_position(wp, tp, 2154 start_line = text_prop_position(wp, tp,
2157 wlv.vcol, 2155 wlv.vcol,
2156 # ifdef FEAT_RIGHTLEFT
2157 wp->w_p_rl
2158 ? wp->w_width - wlv.col - 1
2159 :
2160 # endif
2158 wlv.col, 2161 wlv.col,
2159 &wlv.n_extra, &wlv.p_extra, 2162 &wlv.n_extra, &wlv.p_extra,
2160 &n_attr, &wlv.n_attr_skip, 2163 &n_attr, &wlv.n_attr_skip,
2161 skip_cells > 0); 2164 skip_cells > 0);
2162 if (wlv.p_extra != prev_p_extra) 2165 if (wlv.p_extra != prev_p_extra)