GNU bug report logs -
#56662
29.0.50; Funny region highlights when highlight-nonselected-windows is t
Previous Next
Reported by: Visuwesh <visuweshm <at> gmail.com>
Date: Wed, 20 Jul 2022 11:36:02 UTC
Severity: normal
Tags: wontfix
Found in version 29.0.50
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: Juri Linkov <juri <at> linkov.net>
> Cc: Visuwesh <visuweshm <at> gmail.com>, Eli Zaretskii <eliz <at> gnu.org>,
> 56662 <at> debbugs.gnu.org
> Date: Sun, 24 Jul 2022 19:41:20 +0300
>
> It's very easy to make region highlighting window-local with just
>
> diff --git a/lisp/simple.el b/lisp/simple.el
> index 5443d961e1..04002073bd 100644
> --- a/lisp/simple.el
> +++ b/lisp/simple.el
> @@ -6944,7 +6944,7 @@ redisplay--update-region-highlight
> (eq window (minibuffer-selected-window))))))
> (funcall redisplay-unhighlight-region-function rol)
> (let* ((pt (window-point window))
> - (mark (mark))
> + (mark (or (window-parameter window 'mark) (mark)))
> (start (min pt mark))
> (end (max pt mark))
> (new
>
> Then the main task would be to find the right logic of setting
> the window-local mark. Since this feature request is closed,
> here is a possible starting point for anyone who wants to experiment
> with the prototype trying different use cases:
>
> (add-hook 'activate-mark-hook
> (lambda () (set-window-parameter nil 'mark (mark))))
> (add-hook 'deactivate-mark-hook
> (lambda () (set-window-parameter nil 'mark nil)))
> (add-hook 'window-selection-change-functions
> (lambda (window)
> (when (eq window (selected-window))
> (set-marker (mark-marker) (window-parameter window 'mark)))))
>
Don't forget that this must only happen if
highlight-nonselected-windows is non-nil.
This bug report was last modified 2 years and 299 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.