diff options
author | Mikael Magnusson <mikachu@gmail.com> | 2009-11-29 11:07:12 +0100 |
---|---|---|
committer | Mikael Magnusson <mikachu@gmail.com> | 2015-09-27 02:11:09 +0200 |
commit | 9b07c6fe5ae9fb3791ed4e10841422730501aca2 (patch) | |
tree | 057523adb8b6ae6d566744a308509a8117a547bb | |
parent | 50721a1986a3637e923ccc4531135b8aa39c8e70 (diff) | |
download | zsh-9b07c6fe5ae9fb3791ed4e10841422730501aca2.tar.gz zsh-9b07c6fe5ae9fb3791ed4e10841422730501aca2.tar.xz zsh-9b07c6fe5ae9fb3791ed4e10841422730501aca2.zip |
add zle-line-pre-redraw
Go to some lengths to preserve $LASTWIDGET in pre-redraw means we can't use the callzlehook function has same workaround as 29643
-rw-r--r-- | Src/Zle/zle_refresh.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Src/Zle/zle_refresh.c b/Src/Zle/zle_refresh.c index 6facff429..21e79ccb5 100644 --- a/Src/Zle/zle_refresh.c +++ b/Src/Zle/zle_refresh.c @@ -994,6 +994,7 @@ zrefresh(void) int remetafy; /* flag that zle line is metafied */ int txtchange; /* attributes set after prompts */ int rprompt_off = 1; /* Offset of rprompt from right of screen */ + int old_incompfunc = incompfunc; struct rparams rpms; #ifdef MULTIBYTE_SUPPORT int width; /* width of wide character */ @@ -1039,6 +1040,23 @@ zrefresh(void) tmpalloced = 0; } + if ((initthingy = rthingy_nocreate("zle-line-pre-redraw"))) { + char *args[2]; + Thingy lbindk_save = lbindk, bindk_save = bindk; + refthingy(lbindk_save); + refthingy(bindk_save); + args[0] = initthingy->nam; + args[1] = NULL; + incompfunc = 0; + execzlefunc(initthingy, args, 0); + incompfunc = old_incompfunc; + unrefthingy(initthingy); + unrefthingy(lbindk); + unrefthingy(bindk); + lbindk = lbindk_save; + bindk = bindk_save; + } + /* this will create region_highlights if it's still NULL */ zle_set_highlight(); |