|
From: | Ergus |
Subject: | bug#54450: 29.0.50; redisplay--pre-redisplay-functions issue |
Date: | Fri, 18 Mar 2022 19:52:14 +0100 |
On Fri, Mar 18, 2022 at 08:38:18PM +0200, Eli Zaretskii wrote:
Date: Fri, 18 Mar 2022 18:42:52 +0100 From: Ergus <spacibba@aol.com> Cc: 54450@debbugs.gnu.org >+ if (highlight_nonselected_windows >+ && !NILP (Vtransient_mark_mode) >+ && !NILP (BVAR (current_buffer, mark_active))) >+ bset_redisplay (current_buffer); >+ > /* Set TO to the interval containing the char after CHARPOS, > and TOPREV to the interval containing the char before CHARPOS. > Either one may be null. They may be equal. */ Hi Eli: Yes, this could solve the issue for the region, but not in general for redisplay--update-cursor-face-highlight which was the initial problem with Juri's code. Same for any other function that goes into the pre-redisplay-functions hook.I asked for a test case, and this is what you gave me. If there's another test case, please show it.
Hi Eli A similar issue happens if in the test buffer you do: M-x cursor-face-highlight-mode (setq cursor-face-highlight-nonselected-window t) M-: (insert "AAA"(propertize "Hello World" 'cursor-face 'highlight)"BBB") Then try to move the cursor over the inserted text with the arrows (you should see the highlight when cursor is over the propertized text); The try te same and from other buffer (using with-selected-window). In the second case you will see the cursor moving but the highlighted not updated.
The region example reported in this issue was only the simplest way I found to give you a simple reproducible snippet, but the issue is a bit more general. With the cursor-face we may have a similar issue cause such hook works in the same way, so this condition will need to be extended and extended and extended on every case for every function in pre-redisplay-functions hook.I need to understand the more general case in practical terms. Then I can think about a solution.
[Prev in Thread] | Current Thread | [Next in Thread] |