From: Juri Linkov <juri@linkov.net>
To: 33838@debbugs.gnu.org
Subject: bug#33838: 27.0.50; lazy-highlight fails with a quick key sequence
Date: Sun, 23 Dec 2018 02:05:19 +0200 [thread overview]
Message-ID: <87muox3y68.fsf@mail.linkov.net> (raw)
Quickly typing `C-s C-s' to repeat the last search in a file with long
wrapped lines sometimes fails to lazy-highlight other matches.
This is because the condition in isearch-lazy-highlight-new-loop relies on
the return value of `(sit-for 0)' and when there is input pending like the
second `C-s' keystroke unprocessed due to the large file size with long
lines, it doesn't start a new lazy-highlight loop.
I noticed this problem only after starting to use lazy-count that fails
to count matches. Before that, there was no clear indication that
lazy-highlight failed in such cases.
I doubt that relying on its return value was intentional, so I propose
the following fix:
diff --git a/lisp/isearch.el b/lisp/isearch.el
index dd0973d4ea..5876e70305 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -3661,7 +3661,7 @@ isearch-lazy-highlight-new-loop
search string to change or the window to scroll). It is also used
by other Emacs features."
(when (and (null executing-kbd-macro)
- (sit-for 0) ;make sure (window-start) is credible
+ (progn (sit-for 0) t) ;make sure (window-start) is credible
(or (not (equal isearch-string
isearch-lazy-highlight-last-string))
(not (memq (selected-window)
next reply other threads:[~2018-12-23 0:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-23 0:05 Juri Linkov [this message]
2018-12-23 23:27 ` bug#33838: 27.0.50; lazy-highlight fails with a quick key sequence Juri Linkov
2018-12-25 21:54 ` Juri Linkov
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=87muox3y68.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=33838@debbugs.gnu.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.