diff options
author | Mikael Magnusson <mikachu@gmail.com> | 2015-08-31 08:35:23 +0200 |
---|---|---|
committer | Mikael Magnusson <mikachu@gmail.com> | 2015-09-27 02:11:14 +0200 |
commit | a36d7ab99b4a5b1c10bc68828942faf69c35c0d0 (patch) | |
tree | 7d1cd78c0fe58face57a66cd6d5989244db488c2 | |
parent | 9b07c6fe5ae9fb3791ed4e10841422730501aca2 (diff) | |
download | zsh-a36d7ab99b4a5b1c10bc68828942faf69c35c0d0.tar.gz zsh-a36d7ab99b4a5b1c10bc68828942faf69c35c0d0.tar.xz zsh-a36d7ab99b4a5b1c10bc68828942faf69c35c0d0.zip |
Fix paste highlighting with zle-line-pre-redraw
-rw-r--r-- | Src/Zle/zle_refresh.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Src/Zle/zle_refresh.c b/Src/Zle/zle_refresh.c index 21e79ccb5..43b05484b 100644 --- a/Src/Zle/zle_refresh.c +++ b/Src/Zle/zle_refresh.c @@ -1041,6 +1041,7 @@ zrefresh(void) } if ((initthingy = rthingy_nocreate("zle-line-pre-redraw"))) { + int lastcmd_prev = lastcmd; char *args[2]; Thingy lbindk_save = lbindk, bindk_save = bindk; refthingy(lbindk_save); @@ -1055,6 +1056,9 @@ zrefresh(void) unrefthingy(bindk); lbindk = lbindk_save; bindk = bindk_save; + /* we can't set ZLE_NOTCOMMAND since it's not a legit widget, so + * restore lastcmd manually so that we don't mess up the global state */ + lastcmd = lastcmd_prev; } /* this will create region_highlights if it's still NULL */ |