From 2f3547689cfc8b1b1bf4cbdbd7b3714e2ab1d0a2 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Fri, 6 Mar 2015 09:51:16 +0000 Subject: 34653: move aborted vared lines to ZLE_VARED_ABORTED --- ChangeLog | 3 +++ Doc/Zsh/zle.yo | 3 ++- Src/Zle/zle_main.c | 4 +++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4f9f92886..af0d6c417 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2015-03-06 Peter Stephenson + * 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. diff --git a/Doc/Zsh/zle.yo b/Doc/Zsh/zle.yo index dd8e6286a..b8b9b8c9c 100644 --- a/Doc/Zsh/zle.yo +++ b/Doc/Zsh/zle.yo @@ -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))( diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c index a2f48e13a..cec44c0ed 100644 --- a/Src/Zle/zle_main.c +++ b/Src/Zle/zle_main.c @@ -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); -- cgit 1.4.1