10497c
diff -up ksh-20120801/src/cmd/ksh93/edit/emacs.c.tabfix ksh-20120801/src/cmd/ksh93/edit/emacs.c
b0f7ce
--- ksh-20120801/src/cmd/ksh93/edit/emacs.c.tabfix	2012-07-17 22:44:44.000000000 +0200
b0f7ce
+++ ksh-20120801/src/cmd/ksh93/edit/emacs.c	2013-03-07 15:58:59.902161711 +0100
b0f7ce
@@ -1011,10 +1011,13 @@ static int escape(register Emacs_t* ep,r
10497c
 					ep->ed->e_tabcount=0;
10497c
 				else
10497c
 				{
10497c
+					int oldi = i;
10497c
 					i=ed_getchar(ep->ed,0);
10497c
 					ed_ungetchar(ep->ed,i);
10497c
-					if(isdigit(i))
b0f7ce
+					if(isdigit(i) && oldi=='=')
10497c
 						ed_ungetchar(ep->ed,ESC);
b0f7ce
+					else if (isdigit(i) || i=='\t')
b0f7ce
+						ep->ed->e_tabcount=0;
10497c
 				}
10497c
 			}
b0f7ce
 			else