cbf2026
The ed_viread method is used for reading when locale has an encoding that uses
cbf2026
wide characters (utf8 for example). So we need to cook the raw'ed terminal
cbf2026
before exit, otherwise we end up with a terminal that cannot echo.
cbf2026
cbf2026
--- a/src/cmd/ksh93/sh/fault.c	2010-01-18 21:41:18.000000000 +0530
cbf2026
+++ b/src/cmd/ksh93/sh/fault.c	2010-03-10 21:23:56.000000000 +0530
cbf2026
@@ -614,7 +614,7 @@ void sh_done(void *ptr, register int sig
cbf2026
 	sh_accend();
cbf2026
 #endif	/* SHOPT_ACCT */
cbf2026
 #if SHOPT_VSH || SHOPT_ESH
cbf2026
-	if(sh_isoption(SH_EMACS)||sh_isoption(SH_VI)||sh_isoption(SH_GMACS))
892b12e
+	if(mbwide()||sh_isoption(SH_EMACS)||sh_isoption(SH_VI)||sh_isoption(SH_GMACS))
cbf2026
 		tty_cooked(-1);
cbf2026
 #endif
cbf2026
 #ifdef JOBS