emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] scratch/highlight-n-windows 6da5ca1 2/2: Set `mark-active'


From: Oleh Krehel
Subject: [Emacs-diffs] scratch/highlight-n-windows 6da5ca1 2/2: Set `mark-active' to selected window
Date: Tue, 31 Mar 2015 13:04:29 +0000

branch: scratch/highlight-n-windows
commit 6da5ca1f59a90adbb37dbaf9e52eb5d434cfe455
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    Set `mark-active' to selected window
    
    * lisp/simple.el (activate-mark): Update.
    (redisplay--update-region-highlights): When a buffer is displayed
    multiply, update highlight only in the window equal to mark-active,
    i.e. the one in which the mark was activated.
---
 lisp/simple.el |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/lisp/simple.el b/lisp/simple.el
index ce6e24e..0b33a51 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -4835,7 +4835,7 @@ If NO-TMM is non-nil, leave `transient-mark-mode' alone."
   (when (mark t)
     (unless (region-active-p)
       (force-mode-line-update) ;Refresh toolbar (bug#16382).
-      (setq mark-active t)
+      (setq mark-active (selected-window))
       (unless (or transient-mark-mode no-tmm)
         (setq-local transient-mark-mode 'lambda))
       (run-hooks 'activate-mark-hook))))
@@ -4958,9 +4958,8 @@ also checks the value of `use-empty-active-region'."
           (mapc #'redisplay--update-region-highlight
                 (delq nil
                       (mapcar (lambda (w)
-                                (unless (eq (window-buffer w)
-                                            (current-buffer))
-                                  w))
+                                (and (eq w mark-active)
+                                     w))
                               windows)))
         (let ((msw (and (window-minibuffer-p) (minibuffer-selected-window))))
           (dolist (w windows)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]