summaryrefslogtreecommitdiffstats
path: root/src/screen.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 02:10:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 02:10:58 +0000
commitbee19c22d569e54513a9c591441c7f411811dc81 (patch)
treeb990d2df9fddb8194bfe49e9205005a0d952bc1f /src/screen.c
parentAdding upstream version 2:9.1.0199. (diff)
downloadvim-bee19c22d569e54513a9c591441c7f411811dc81.tar.xz
vim-bee19c22d569e54513a9c591441c7f411811dc81.zip
Adding upstream version 2:9.1.0374.upstream/2%9.1.0374
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/screen.c')
-rw-r--r--src/screen.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/screen.c b/src/screen.c
index 71ddbca..35d3002 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -1981,7 +1981,21 @@ screen_char(unsigned off, int row, int col)
{
char_u buf[MB_MAXBYTES + 1];
- if (utf_ambiguous_width(ScreenLinesUC[off]))
+ if (
+#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]))
{
if (*p_ambw == 'd'
#ifdef FEAT_GUI