diff options
author | h-east <h.east.727@gmail.com> | 2024-04-20 17:57:19 +0200 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2024-04-20 18:04:06 +0200 |
commit | 8927c9b720135610a1193999d29be76927b05ab3 (patch) | |
tree | bdc196a486d27f952f1e516b8c7b608b4b5f4b34 /src/screen.c | |
parent | 564166f68184071775cffffe331a9e12241be1ac (diff) |
patch 9.1.0358: wrong drawing in GUI with setcellwidth()v9.1.0358
Problem: wrong drawing in GUI with setcellwidth()
(after v9.1.0344)
Solution: move gui.in_use condition (h-east)
closes: #14600
Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src/screen.c')
-rw-r--r-- | src/screen.c | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/src/screen.c b/src/screen.c index a8b4559b11..35d300213b 100644 --- a/src/screen.c +++ b/src/screen.c @@ -1981,22 +1981,19 @@ screen_char(unsigned off, int row, int col) { char_u buf[MB_MAXBYTES + 1]; - if (get_cellwidth(ScreenLinesUC[off]) > 1) - { - // If the width is set to 2 with `setcellwidths` - + if ( #ifdef FEAT_GUI - if (!gui.in_use) - { -#endif - // Clear the two screen cells. If the character is actually - // single width it won't change the second cell. - out_str((char_u *)" "); - term_windgoto(row, col); - screen_cur_col = 9999; -#ifdef FEAT_GUI - } + !gui.in_use && #endif + get_cellwidth(ScreenLinesUC[off]) > 1 + ) + { + // If the width is set to 2 with setcellwidths() + // clear the two screen cells. If the character is actually + // single width it won't change the second cell. + out_str((char_u *)" "); + term_windgoto(row, col); + screen_cur_col = 9999; } else if (utf_ambiguous_width(ScreenLinesUC[off])) { |