GNU bug report logs -
#58175
29.0.50; M-x window-swap-states during an active mark leaves behind a region overlay
Previous Next
Full log
Message #26 received at 58175 <at> debbugs.gnu.org (full text, mbox):
>> > Looks like the internal-region-overlay window parameter, which is
>> > important for correct workings of region-highlight, isn't copied
>> > correctly to the other window as part of swapping state, because its
>> > value ends up as "overlay N in no buffer", i.e. the overlay's buffer
>> > is lost in transition.
>>
>> If you want a window parameter to get copied when swapping window states,
>> you have to explicitly mark it as "persistent". For example with:
>>
>> (push '(internal-region-overlay . t) window-persistent-parameters)
Hmm... I must say I misunderstood the report when I read it originally.
Now that I see a bit more clearly what it's about I wonder why we'd have
to do something special (w.r.t `internal-region-overlay`) for
`window-swap-states` compared to what we do (i.e. nothing at all) when
we do `set-window-buffer`.
More specifically, AFAICT the code that uses `internal-region-overlay`
just tries to reuse that info to try and reduce memory churn, but it
should work correctly even when `internal-region-overlay` points to the
wrong buffer or even if it's not an overlay at all.
IOW, I suspect the bug is in `redisplay-(un)highlight-region-function`
and adding `internal-region-overlay` to `window-persistent-parameters`
would likely just cover it for that use-case but it could
reoccur elsewhere.
Stefan
This bug report was last modified 2 years and 304 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.