diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2010-03-22 16:22:13 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2010-03-22 16:22:13 +0000 |
commit | 08dec290d4d6558f95df9e22daf3a9940547442a (patch) | |
tree | 9eb814910f2b5c396d2cd82928e5e7ce14f1984d /Src/hist.c | |
parent | 7dd4c69371b1b8a3bdb7e89a14f1750559b8cc42 (diff) | |
download | zsh-08dec290d4d6558f95df9e22daf3a9940547442a.tar.gz zsh-08dec290d4d6558f95df9e22daf3a9940547442a.tar.xz zsh-08dec290d4d6558f95df9e22daf3a9940547442a.zip |
Fix ZLE access to pushed history line
Diffstat (limited to 'Src/hist.c')
-rw-r--r-- | Src/hist.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Src/hist.c b/Src/hist.c index b1e4e82c4..08a613d4c 100644 --- a/Src/hist.c +++ b/Src/hist.c @@ -164,6 +164,22 @@ mod_export char *hptr; /**/ mod_export char *chline; +/* + * The current history line as seen by ZLE. + * We modify chline for use in other contexts while ZLE may + * still be running; ZLE should see only the top-level value. + * + * To avoid having to modify this every time we modify chline, + * we set it when we push the stack, and unset it when we pop + * the appropriate value off the stack. As it's never modified + * on the stack this is the only maintainance we ever do on it. + * In return, ZLE has to check both zle_chline and (if that's + * NULL) chline to get the current value. + */ + +/**/ +mod_export char *zle_chline; + /* true if the last character returned by hgetc was an escaped bangchar * * if it is set and NOBANGHIST is unset hwaddc escapes bangchars */ |