diff --git a/contrib/libreadline/display.c b/contrib/libreadline/display.c index 47ff06159747..fe08861da73c 100644 --- a/contrib/libreadline/display.c +++ b/contrib/libreadline/display.c @@ -2380,6 +2380,8 @@ _rl_col_width (str, start, end) if (end <= start) return 0; + if (MB_CUR_MAX == 1 || rl_byte_oriented) + return (end - start); memset (&ps, 0, sizeof (mbstate_t));