[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/highlight-n-windows 6ba6216 1/2: Ignore `highlight
From: |
Oleh Krehel |
Subject: |
[Emacs-diffs] scratch/highlight-n-windows 6ba6216 1/2: Ignore `highlight-nonselected-windows' for same buffer in two windows |
Date: |
Tue, 31 Mar 2015 13:04:28 +0000 |
branch: scratch/highlight-n-windows
commit 6ba6216a5105a777f7e2f8128bcb9c0a77b6b2c4
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
Ignore `highlight-nonselected-windows' for same buffer in two windows
* lisp/simple.el (redisplay--update-region-highlights): Update.
It looks really weird when the same buffer is opened in multiple
windows and `highlight-nonselected-windows' is t. Especially when the
mouse is pressed.
---
lisp/simple.el | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/lisp/simple.el b/lisp/simple.el
index 5185607..ce6e24e 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -4955,7 +4955,13 @@ also checks the value of `use-empty-active-region'."
(redisplay--update-region-highlight (selected-window))
(unless (listp windows) (setq windows (window-list-1 nil nil t)))
(if highlight-nonselected-windows
- (mapc #'redisplay--update-region-highlight windows)
+ (mapc #'redisplay--update-region-highlight
+ (delq nil
+ (mapcar (lambda (w)
+ (unless (eq (window-buffer w)
+ (current-buffer))
+ w))
+ windows)))
(let ((msw (and (window-minibuffer-p) (minibuffer-selected-window))))
(dolist (w windows)
(if (or (eq w (selected-window)) (eq w msw))