]> git.eshelyaron.com Git - emacs.git/commitdiff
(handle-select-window): Don't switch window when we're in the minibuffer.
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 20 Jan 2005 14:23:23 +0000 (14:23 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Thu, 20 Jan 2005 14:23:23 +0000 (14:23 +0000)
lisp/ChangeLog
lisp/window.el

index 05a6915355fbd5e63eee7283e4f3f6e26b99e222..5abd6512e46aebc6e85c41cd773dd52fdd760e62 100644 (file)
@@ -1,3 +1,8 @@
+2005-01-20  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * window.el (handle-select-window): Don't switch window when we're
+       in the minibuffer.
+
 2005-01-10  Paul Pogonyshev  <pogonyshev@gmx.net>
 
        * subr.el (dotimes-with-progress-reporter): New macro.
index 5ec752f3f23382ddd454c9a3c4bcde3555950c49..5768436eaae5c2520740d82f7f7699f1345f55ca 100644 (file)
@@ -1,6 +1,6 @@
 ;;; window.el --- GNU Emacs window commands aside from those written in C
 
-;; Copyright (C) 1985, 1989, 1992, 1993, 1994, 2000, 2001, 2002, 2004
+;; Copyright (C) 1985, 1989, 1992, 1993, 1994, 2000, 2001, 2002, 2004, 2005
 ;;  Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
@@ -631,6 +631,12 @@ and the buffer that is killed or buried is the one in that window."
   (interactive "e")
   (let ((window (posn-window (event-start event))))
     (if (and (window-live-p window)
+            ;; Don't switch if we're currently in the minibuffer.
+            ;; This tries to work around problems where the minibuffer gets
+            ;; unselected unexpectedly, and where you then have to move
+            ;; your mouse all the way down to the minibuffer to select it.
+            (not (window-minibuffer-p (selected-window)))
+            ;; Don't switch to a minibuffer window unless it's active.
             (or (not (window-minibuffer-p window))
                 (minibuffer-window-active-p window)))
        (select-window window))))
@@ -643,5 +649,5 @@ and the buffer that is killed or buried is the one in that window."
 (define-key ctl-x-map "+" 'balance-windows)
 (define-key ctl-x-4-map "0" 'kill-buffer-and-window)
 
-;;; arch-tag: b508dfcc-c353-4c37-89fa-e773fe10cea9
+;; arch-tag: b508dfcc-c353-4c37-89fa-e773fe10cea9
 ;;; window.el ends here