mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-13 19:52:20 +00:00
edit.c: Fix history generation if there are zero arguments
This applies a fix from OpenSUSE: https://build.opensuse.org/package/view_file/shells/ksh/ksh93-reg.dif
This commit is contained in:
parent
627df2b19a
commit
69e18de58f
1 changed files with 7 additions and 2 deletions
|
@ -1762,8 +1762,13 @@ int ed_histgen(Edit_t *ep,const char *pattern)
|
|||
mplast->next = mp;
|
||||
mplast->next = 0;
|
||||
}
|
||||
ep->hlist = (Histmatch_t**)argv;
|
||||
ep->hfirst = ep->hlist?ep->hlist[0]:0;
|
||||
if (argv)
|
||||
{
|
||||
ep->hlist = (Histmatch_t**)argv;
|
||||
ep->hfirst = ep->hlist?ep->hlist[0]:0;
|
||||
}
|
||||
else
|
||||
ep->hfirst = 0;
|
||||
return(ep->hmax=ac);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue