zsh-workers
 help / color / mirror / code / Atom feed
From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: zsh-workers@zsh.org
Cc: m0viefreak <m0viefreak.cm@googlemail.com>
Subject: Re: [PATCH] zle: Call zle-line-pre-redraw after inserting a completion result
Date: Sun, 16 Oct 2016 15:13:54 +0000	[thread overview]
Message-ID: <20161016151354.GA21942@fujitsu.shahaf.local2> (raw)
In-Reply-To: <43c19ce7-6445-8b56-68e7-60fc82258183@googlemail.com>

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@googlemail.com>
> 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;
>      }
>  }


  parent reply	other threads:[~2016-10-16 15:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-08 17:30 m0viefreak
2016-10-11  3:03 ` Bart Schaefer
2016-10-16 15:13 ` Daniel Shahaf [this message]
2016-10-17  8:39   ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161016151354.GA21942@fujitsu.shahaf.local2 \
    --to=d.s@daniel.shahaf.name \
    --cc=m0viefreak.cm@googlemail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).