diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2003-12-15 22:45:27 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2003-12-15 22:45:27 +0000 |
commit | 6eb5f99f1e71e8ea89057c2843f3e8273a0d2fdd (patch) | |
tree | 1b1a681b89fe613b3405da6ee630bbb86d15b17f /Src/Zle/zle_main.c | |
parent | ff1feb920f80f58581a79dc6256cc25364b8fe7d (diff) | |
download | zsh-6eb5f99f1e71e8ea89057c2843f3e8273a0d2fdd.tar.gz zsh-6eb5f99f1e71e8ea89057c2843f3e8273a0d2fdd.tar.xz zsh-6eb5f99f1e71e8ea89057c2843f3e8273a0d2fdd.zip |
19295: $CONTEXT zle parameter
Diffstat (limited to 'Src/Zle/zle_main.c')
-rw-r--r-- | Src/Zle/zle_main.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c index c3317175c..25d2539dc 100644 --- a/Src/Zle/zle_main.c +++ b/Src/Zle/zle_main.c @@ -58,6 +58,11 @@ mod_export int hascompmod; /**/ int zlereadflags; +/* ZLCON_* flags passed to zleread() */ + +/**/ +int zlecontext; + /* != 0 if we're done editing */ /**/ @@ -735,7 +740,7 @@ zlecore(void) /**/ unsigned char * -zleread(char *lp, char *rp, int flags) +zleread(char *lp, char *rp, int flags, int context) { unsigned char *s; int old_errno = errno; @@ -787,6 +792,7 @@ zleread(char *lp, char *rp, int flags) free_prepostdisplay(); zlereadflags = flags; + zlecontext = context; histline = curhist; undoing = 1; line = (unsigned char *)zalloc((linesz = 256) + 2); @@ -838,7 +844,7 @@ zleread(char *lp, char *rp, int flags) trashzle(); free(lpromptbuf); free(rpromptbuf); - zleactive = zlereadflags = lastlistlen = 0; + zleactive = zlereadflags = lastlistlen = zlecontext = 0; alarm(0); freeundo(); @@ -1154,7 +1160,8 @@ bin_vared(char *name, char **args, Options ops, int func) if (OPT_ISSET(ops,'h')) hbegin(2); isfirstln = OPT_ISSET(ops,'e'); - t = (char *) zleread(p1, p2, OPT_ISSET(ops,'h') ? ZLRF_HISTORY : 0); + t = (char *) zleread(p1, p2, OPT_ISSET(ops,'h') ? ZLRF_HISTORY : 0, + ZLCON_VARED); if (OPT_ISSET(ops,'h')) hend(NULL); isfirstln = ifl; |