ksh/SOURCES/ksh-20120801-tabfix.patch
2021-10-08 12:27:58 +00:00

19 lines
630 B
Diff

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