Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: Don't store ZLE_LINE_ABORTED in vared context
On Mar 5, 3:41am, Mikael Magnusson wrote:
} Subject: Re: PATCH: Don't store ZLE_LINE_ABORTED in vared context
}
} On Thu, Mar 5, 2015 at 2:57 AM, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
} > } annoying if you set up a widget to do the up-line-or-aborted, because
} > } it will grab the vared text as a command then.
} >
} > Hrm, perhaps, but I believe the intent was to be able to hang on to
} > whatever buffer was most recently being edited when the interrupt came
} > through.
}
} So how should I handle this case in my shell widget then?
Based on this: http://www.zsh.org/mla/workers/2010/msg00702.html
I wonder if the solution is that zle-line-finish should be called even
when the editor is aborted with send-break.
However, you should be able to do something like
zle-line-init() {
if [[ $LAST_CONTEXT = vared ]]
then unset ZLE_LINE_ABORTED
else : your thing with ZLE_LINE_SAVED
fi
LAST_CONTEXT=$CONTEXT
}
} I think pws introduced the feature so maybe he can clarify.
Look at http://www.zsh.org/mla/workers/2010/msg00681.html and then
http://www.zsh.org/mla/workers/2010/msg00685.html ...
> Hmm... I'm wondering if I put it in the right place. sendbreak can abort
> other things than the full line edit, and I already claimed that "this
> parameter is set by the line editor when an error occurs", which as you
> spotted isn't necessarily true.
I think the intent was to capture "other things than the full line edit"
with ZLE_LINE_ABORT. But yes, let PWS weigh in.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author