mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-13 19:52:20 +00:00
Fix editor prediction code garbling input
This applies a patch from OpenSUSE. Source: https://build.opensuse.org/package/view_file/shells/ksh/ksh93-edpredict.dif | Tue Jul 5 14:49:03 CEST 2016 - mls@suse.de | | - fix editor prediction code garbling input [bnc#964966] | new patch: ksh93-edpredict.dif Unfortunately the bug report is not currently public: https://bugzilla.opensuse.org/show_bug.cgi?id=964966 but this one seems sensible enough and is in production use, so I'll take it on faith.
This commit is contained in:
parent
9b5ff0f833
commit
db5621dbf8
3 changed files with 3 additions and 7 deletions
|
@ -621,8 +621,8 @@ void ed_setup(register Edit_t *ep, int fd, int reedit)
|
|||
ep->hoff = 0;
|
||||
#endif /* SHOPT_EDPREDICT */
|
||||
#if KSHELL
|
||||
ep->e_stkptr = stakptr(0);
|
||||
ep->e_stkoff = staktell();
|
||||
ep->e_stkptr = stakfreeze(0);
|
||||
if(!(last = shp->prompt))
|
||||
last = "";
|
||||
shp->prompt = 0;
|
||||
|
|
|
@ -726,10 +726,8 @@ process:
|
|||
draw(ep,FINAL);
|
||||
tty_cooked(ERRIO);
|
||||
if(ed->e_nlist)
|
||||
{
|
||||
ed->e_nlist = 0;
|
||||
stakset(ed->e_stkptr,ed->e_stkoff);
|
||||
}
|
||||
stakset(ed->e_stkptr,ed->e_stkoff);
|
||||
if(c == '\n')
|
||||
{
|
||||
out[eol++] = '\n';
|
||||
|
|
|
@ -593,10 +593,8 @@ int ed_viread(void *context, int fd, register char *shbuf, int nchar, int reedit
|
|||
/* to cause the shell to process the line */
|
||||
tty_cooked(ERRIO);
|
||||
if(ed->e_nlist)
|
||||
{
|
||||
ed->e_nlist = 0;
|
||||
stakset(ed->e_stkptr,ed->e_stkoff);
|
||||
}
|
||||
stakset(ed->e_stkptr,ed->e_stkoff);
|
||||
if( vp->addnl )
|
||||
{
|
||||
virtual[++last_virt] = '\n';
|
||||
|
|
Loading…
Reference in a new issue