From bf0ab54638a5ef969749f6ceae30e864f9556ea8 Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Thu, 25 Feb 2021 18:22:00 +0100 Subject: Vendor import ncurses 6.2-20210220 --- ncurses/base/wresize.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'ncurses/base/wresize.c') diff --git a/ncurses/base/wresize.c b/ncurses/base/wresize.c index 93276ef5c42b..30718b8878fd 100644 --- a/ncurses/base/wresize.c +++ b/ncurses/base/wresize.c @@ -34,7 +34,7 @@ #include -MODULE_ID("$Id: wresize.c,v 1.39 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: wresize.c,v 1.41 2020/04/18 21:01:00 tom Exp $") static int cleanup_lines(struct ldat *data, int length) @@ -176,7 +176,15 @@ wresize(WINDOW *win, int ToLines, int ToCols) if (s == 0) returnCode(cleanup_lines(new_lines, row)); for (col = 0; col <= ToCols; ++col) { - s[col] = (col <= size_x + bool valid = (col <= size_x); + if_WIDEC({ + if (col == ToCols + && col < size_x + && isWidecBase(win->_line[row].text[col])) { + valid = FALSE; + } + }); + s[col] = (valid ? win->_line[row].text[col] : win->_nc_bkgd); } -- cgit v1.2.3