1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-03 10:21:46 +02:00

34653: move aborted vared lines to ZLE_VARED_ABORTED

This commit is contained in:
Peter Stephenson 2015-03-06 09:51:16 +00:00
parent 00b3085b96
commit 2f3547689c
3 changed files with 8 additions and 2 deletions

View file

@ -1,5 +1,8 @@
2015-03-06 Peter Stephenson <p.stephenson@samsung.com>
* 34653: Doc/Zsh/zle.yo, Src/Zle/zle_main.c: move aborted vared
lines to ZLE_VARED_ABORTED.
* 34657: Doc/Zsh/params.yo: document the effect of substring
subscripting better.

View file

@ -2223,7 +2223,8 @@ item(tt(send-break) (^G ESC-^G) (unbound) (unbound))(
Abort the current editor function, e.g. tt(execute-named-command), or the
editor itself, e.g. if you are in tt(vared). Otherwise abort the parsing of
the current line; in this case the aborted line is available in the shell
variable tt(ZLE_LINE_ABORTED).
variable tt(ZLE_LINE_ABORTED). If the editor is aborted from within
tt(vared), the variable tt(ZLE_VARED_ABORTED) is set.
)
tindex(run-help)
item(tt(run-help) (ESC-H ESC-h) (unbound) (unbound))(

View file

@ -1253,7 +1253,9 @@ zleread(char **lp, char **rp, int flags, int context, char *init, char *finish)
zlecore();
if (errflag)
setsparam("ZLE_LINE_ABORTED", zlegetline(NULL, NULL));
setsparam((zlecontext == ZLCON_VARED) ?
"ZLE_VARED_ABORTED" :
"ZLE_LINE_ABORTED", zlegetline(NULL, NULL));
if (done && !exit_pending && !errflag)
zlecallhook(finish, NULL);