[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#33446: 26; `isearch-lazy-highlight-update' in MASTER today
From: |
Juri Linkov |
Subject: |
bug#33446: 26; `isearch-lazy-highlight-update' in MASTER today |
Date: |
Wed, 21 Nov 2018 01:14:12 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) |
> The proximate cause of the error was likely due to
> my calling `isearch-lazy-highlight-update' outside
> searching (i.e., nil `isearch-mode'). But I think
> there might still be a bug in the Isearch code.
isearch-lazy-highlight-update is not intended
to be used in a window other than the window
where isearch-lazy-highlight-new-loop was called.
It has many dependencies on the original window
being selected.
> The `isearch-lazy-highlight-update' code does this:
>
> (save-selected-window
> (if (and (window-live-p isearch-lazy-highlight-window)
> (not (memq (selected-window)
> isearch-lazy-highlight-window-group)))
> (select-window isearch-lazy-highlight-window))
>
> That causes the window in the other frame to be selected.
It should select the same window where
isearch-lazy-highlight-new-loop was called.
> The code then does this:
>
> (setq window-start (window-group-start))
> (setq window-end (window-group-end))
>
> This causes `window-end' to be nil. Should `window-group-*' here
> be passed window `isearch-lazy-highlight-window'?
isearch-lazy-highlight-window should not be passed here
because it's guaranteed to be selected by the code above.