diff --git a/LOG b/LOG index 9e6e8730a5..a346112fd7 100644 --- a/LOG +++ b/LOG @@ -1385,3 +1385,5 @@ s/update-revision, BUILDING - export `ee-backward-delete-sexp` binding in the expression-editor module. expeditor.ss +- fix ee_read_char to handle ^@ properly + expeditor.c diff --git a/c/expeditor.c b/c/expeditor.c index 5a6a50788c..c16865bc1e 100644 --- a/c/expeditor.c +++ b/c/expeditor.c @@ -691,11 +691,15 @@ static ptr s_ee_read_char(IBOOL blockp) { #endif /* PTHREADS */ if (n == 1) { - old_locale = uselocale(term_locale); - sz = mbrtowc(&wch, buf, 1, &term_out_mbs); - uselocale(old_locale); - if (sz == 1) { - return Schar(wch); + if (buf[0] == '\0') { + return Schar('\0'); + } else { + old_locale = uselocale(term_locale); + sz = mbrtowc(&wch, buf, 1, &term_out_mbs); + uselocale(old_locale); + if (sz == 1) { + return Schar(wch); + } } }