fix ee_read_char to handle ^@ properly
original commit: e962a03987470d0a3937446c10af3a94793ffc43
This commit is contained in:
parent
2647c0df24
commit
0df195f066
2
LOG
2
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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user