]> git.eshelyaron.com Git - emacs.git/commitdiff
Better check for displaying completions near the minibuffer.
authorJuri Linkov <juri@linkov.net>
Fri, 5 Dec 2014 23:42:11 +0000 (01:42 +0200)
committerJuri Linkov <juri@linkov.net>
Fri, 5 Dec 2014 23:42:11 +0000 (01:42 +0200)
* lisp/minibuffer.el (minibuffer-completion-help): Compare
selected-window with minibuffer-window to check whether
completions should be displayed near the minibuffer.
http://lists.gnu.org/archive/html/emacs-devel/2014-12/msg00311.html

Fixes: debbugs:17809
lisp/ChangeLog
lisp/minibuffer.el

index 7cbacecd16f44814a35304c6a391acba47d9b0ff..5cc530c42b6ee2c9ab730d5f0c5bb032b0566d80 100644 (file)
@@ -1,3 +1,10 @@
+2014-12-05  Juri Linkov  <juri@linkov.net>
+
+       * minibuffer.el (minibuffer-completion-help): Compare
+       selected-window with minibuffer-window to check whether
+       completions should be displayed near the minibuffer.  (Bug#17809)
+       http://lists.gnu.org/archive/html/emacs-devel/2014-12/msg00311.html
+
 2014-12-05  Michael Albinus  <michael.albinus@gmx.de>
 
        * vc/vc-mtn.el (vc-mtn-root):
index 0bee13b155c3a0ee98dc164d875e9cf50ed5cc04..ee97174b0b2fb7ca8a6cc31e1fff7971e5981428 100644 (file)
@@ -1815,13 +1815,9 @@ variables.")
              ;; Use `display-buffer-below-selected' for inline completions,
              ;; but not in the minibuffer (e.g. in `eval-expression')
              ;; for which `display-buffer-at-bottom' is used.
-             ;; Compare `this-command' with `completion-at-point'
-             ;; since `completion--in-region-1' sets `this-command'
-             ;; to this value for region completion commands.
-             ,(if (and (eq this-command 'completion-at-point)
-                       (not (minibuffer-selected-window)))
-                  'display-buffer-below-selected
-                'display-buffer-at-bottom))
+             ,(if (eq (selected-window) (minibuffer-window))
+                  'display-buffer-at-bottom
+                'display-buffer-below-selected))
             (window-height . fit-window-to-buffer))
           nil
           ;; Remove the base-size tail because `sort' requires a properly