fix another reproducer for tab completion

This commit is contained in:
Michal Hlavinka 2013-03-07 16:32:37 +01:00
parent 0a835abdfb
commit b0f7ce8f5c
2 changed files with 12 additions and 5 deletions

View File

@ -1,7 +1,7 @@
diff -up ksh-20120801/src/cmd/ksh93/edit/emacs.c.tabfix ksh-20120801/src/cmd/ksh93/edit/emacs.c 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 2013-01-04 16:50:21.124706144 +0100 --- 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-01-04 16:50:21.150706365 +0100 +++ ksh-20120801/src/cmd/ksh93/edit/emacs.c 2013-03-07 15:58:59.902161711 +0100
@@ -1011,9 +1011,10 @@ static int escape(register Emacs_t* ep,r @@ -1011,10 +1011,13 @@ static int escape(register Emacs_t* ep,r
ep->ed->e_tabcount=0; ep->ed->e_tabcount=0;
else else
{ {
@ -9,7 +9,10 @@ diff -up ksh-20120801/src/cmd/ksh93/edit/emacs.c.tabfix ksh-20120801/src/cmd/ksh
i=ed_getchar(ep->ed,0); i=ed_getchar(ep->ed,0);
ed_ungetchar(ep->ed,i); ed_ungetchar(ep->ed,i);
- if(isdigit(i)) - if(isdigit(i))
+ if(oldi=='=' && isdigit(i)) + if(isdigit(i) && oldi=='=')
ed_ungetchar(ep->ed,ESC); ed_ungetchar(ep->ed,ESC);
+ else if (isdigit(i) || i=='\t')
+ ep->ed->e_tabcount=0;
} }
} }
else

View File

@ -6,7 +6,7 @@ URL: http://www.kornshell.com/
Group: System Environment/Shells Group: System Environment/Shells
License: EPL License: EPL
Version: 20120801 Version: 20120801
Release: 7%{?dist} Release: 8%{?dist}
Source0: http://www.research.att.com/~gsf/download/tgz/ast-ksh.%{releasedate}.tgz Source0: http://www.research.att.com/~gsf/download/tgz/ast-ksh.%{releasedate}.tgz
Source1: http://www.research.att.com/~gsf/download/tgz/INIT.%{releasedate}.tgz Source1: http://www.research.att.com/~gsf/download/tgz/INIT.%{releasedate}.tgz
Source2: kshcomp.conf Source2: kshcomp.conf
@ -80,6 +80,7 @@ install -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/kshrc
install -D -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/binfmt.d/kshcomp.conf install -D -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/binfmt.d/kshcomp.conf
%check %check
[ -f ./skipcheck -o -f ./../skipcheck] && exit 0 ||:
%if 0%{?rhel} > 6 %if 0%{?rhel} > 6
%ifarch s390 %ifarch s390
exit 0 exit 0
@ -144,6 +145,9 @@ fi
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
%changelog %changelog
* Thu Mar 07 2013 Michal Hlavinka <mhlavink@redhat.com> - 20120801-8
- fix another reproducer for tab completion
* Fri Feb 22 2013 Michal Hlavinka <mhlavink@redhat.com> - 20120801-7 * Fri Feb 22 2013 Michal Hlavinka <mhlavink@redhat.com> - 20120801-7
- do not segfault on kill % (#914669) - do not segfault on kill % (#914669)