On Wed, 10 Oct 2018 08:00:14 +0900, Masato Asou wrote: > diff --git a/lib/libedit/refresh.c b/lib/libedit/refresh.c > index f2d001d67cb..5f2d607d356 100644 > --- a/lib/libedit/refresh.c > +++ b/lib/libedit/refresh.c > @@ -1061,6 +1061,7 @@ re_fastputc(EditLine *el, wint_t c) > > terminal__putc(el, c); > el->el_display[el->el_cursor.v][el->el_cursor.h++] = c; > + el->el_display[el->el_cursor.v][el->el_cursor.h] = '\0'; > while (--w > 0) > el->el_display[el->el_cursor.v][el->el_cursor.h++] > = MB_FILL_CHAR;
Shouldn't the NUL character come after filling with MB_FILL_CHAR? Otherwise, it may still be unterminated. - todd