zsh-workers
 help / color / mirror / code / Atom feed
From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: How can Zle -U interfere with zsh-syntax-highlighting?
Date: Thu, 19 May 2016 21:22:18 +0000	[thread overview]
Message-ID: <20160519212218.GA3125@tarsus.local2> (raw)
In-Reply-To: <CAH+w=7b7g-g7JmFvrgR4ezWz7CrVZnXVrV+u9iOitX0H0y_pVQ@mail.gmail.com>

Bart Schaefer wrote on Sun, May 15, 2016 at 04:13:21 -0700:
> I suppose it might make sense for "zle -U" to pretend to be actual
> input even to the extent of PENDING, but it currently does not.

Like this?

[[[
diff --git a/Src/Zle/zle_params.c b/Src/Zle/zle_params.c
index c6387bf..d5b1e87 100644
--- a/Src/Zle/zle_params.c
+++ b/Src/Zle/zle_params.c
@@ -500,7 +500,7 @@ get_bufferlines(UNUSED(Param pm))
 static zlong
 get_pending(UNUSED(Param pm))
 {
-    return noquery(0);
+    return noquery(0) + kungetct;
 }
 
 /**/
]]]

It doesn't cause any obvious problem, but I couldn't reproduce the
original slowdown so I'm not sure whether this patch fixes it.

In any case, I won't push it yet since I won't be able to commit
followups timely in case it breaks something — but if someone else wants
to push it before I get back, feel free.

Cheers,

Daniel


  parent reply	other threads:[~2016-05-19 21:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-14 21:07 Sebastian Gniazdowski
2016-05-14 21:23 ` Sebastian Gniazdowski
2016-05-15 11:13 ` Bart Schaefer
2016-05-15 15:24   ` Sebastian Gniazdowski
2016-05-15 15:24     ` Sebastian Gniazdowski
2016-05-15 15:37       ` Mikael Magnusson
2016-05-15 15:41     ` Sebastian Gniazdowski
2016-05-18 17:53       ` Sebastian Gniazdowski
2016-05-19 21:22   ` Daniel Shahaf [this message]
2016-05-25  6:14     ` Sebastian Gniazdowski

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=20160519212218.GA3125@tarsus.local2 \
    --to=d.s@daniel.shahaf.name \
    --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).