Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] zle: Call zle-line-pre-redraw after inserting a completion result



m0viefreak wrote on Sat, Oct 08, 2016 at 19:30:16 +0200:
> This patch originated from a zsh-synatx-highlighting issue:
> https://github.com/zsh-users/zsh-syntax-highlighting/issues/375
> 
> I think redrawhook() should be called at the end of do_single()
> to make sure that zle-line-pre-redraw is run when cycling the results of
> a menu completion.

Any thoughts on the patch?  With my z-sy-h hat, I confirm it behaves as
promised (applies highlighting whilst tabbing through menu completion),
but with my zsh hat, I am not familiar with zle enough to review this
patch.

Cheers,

Daniel

> From 6c1e1fe71011f8617a85fb2d53b7a36c8fcd0d07 Mon Sep 17 00:00:00 2001
> From: m0viefreak <m0viefreak.cm@xxxxxxxxxxxxxx>
> Date: Sat, 8 Oct 2016 18:53:55 +0200
> Subject: [PATCH] zle: Call zle-line-pre-redraw after inserting a completion
>  result
> 
> This is necessary to make sure redrawhook() is called while
> cycling results in menu completion.
> ---
>  Src/Zle/compresult.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Src/Zle/compresult.c b/Src/Zle/compresult.c
> index 7fec7c8..b7ec18f 100644
> --- a/Src/Zle/compresult.c
> +++ b/Src/Zle/compresult.c
> @@ -1191,6 +1191,7 @@ do_single(Cmatch m)
>  	if (menucmp)
>  	    minfo.cur = &m;
>  	runhookdef(INSERTMATCHHOOK, (void *) &dat);
> +	redrawhook();
>  	minfo.cur = om;
>      }
>  }



Messages sorted by: Reverse Date, Date, Thread, Author