From f316497f605cae5bd6b839fe301000c2518c385f Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 19 Jan 2010 17:39:56 +0000 Subject: [PATCH] [7.2.341] Popup menu wraps to next line when double-wide character doesn't Problem: Popup menu wraps to next line when double-wide character doesn't fit. (Jiang Ma) Solution: Display a ">" instead. (Dominique Pelle) Patch 7.2.341 --- src/screen.c | 9 ++++++++- src/version.c | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/screen.c b/src/screen.c index 79980e90..d461cede 100644 --- a/src/screen.c +++ b/src/screen.c @@ -6434,6 +6434,13 @@ screen_puts_len(text, len, row, col, attr) else prev_c = u8c; # endif + if (col + mbyte_cells > screen_Columns) + { + /* Only 1 cell left, but character requires 2 cells: + * display a '>' in the last column to avoid wrapping. */ + c = '>'; + mbyte_cells = 1; + } } } #endif @@ -9210,7 +9217,7 @@ unshowmode(force) int force; { /* - * Don't delete it right now, when not redrawing or insided a mapping. + * Don't delete it right now, when not redrawing or inside a mapping. */ if (!redrawing() || (!force && char_avail() && !KeyTyped)) redraw_cmdline = TRUE; /* delete mode later */ diff --git a/src/version.c b/src/version.c index 355549ba..7f35caad 100644 --- a/src/version.c +++ b/src/version.c @@ -682,6 +682,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 341, +/**/ 340, /**/ 339, -- 2.11.4.GIT