]> git.eshelyaron.com Git - emacs.git/commitdiff
(quail-update-guidance): Force a redisplay before setting the guidance
authorMiles Bader <miles@gnu.org>
Fri, 20 Oct 2000 22:56:41 +0000 (22:56 +0000)
committerMiles Bader <miles@gnu.org>
Fri, 20 Oct 2000 22:56:41 +0000 (22:56 +0000)
window size, to ensure we see any minibuffer expansion it causes.

lisp/international/quail.el

index 6fc01468a76cdf33a1729419a5957df7177741f6..2743126b08985dfed378e740ef091f1a25d37d4f 100644 (file)
@@ -1955,14 +1955,19 @@ or in a newly created frame (if the selected frame has no other windows)."
   ;; Update guidance buffer.
   (if (quail-require-guidance-buf)
       (let ((guidance (quail-guidance)))
-       (if (and (eq (selected-frame) (window-frame (minibuffer-window)))
-                (eq (selected-frame) (window-frame quail-guidance-win)))
-           ;; Make sure the height of the guidance window is OK
-           ;; (sometimes, if the minibuffer window has expanded due to
-           ;; user input, it will cause the guidance window to be only
-           ;; partially visible).
-           (set-window-text-height quail-guidance-win 1)
-         (quail-show-guidance-buf))
+       (if (not (and (eq (selected-frame) (window-frame (minibuffer-window)))
+                     (eq (selected-frame) (window-frame quail-guidance-win))))
+           ;; The guidance window is not show in this frame, show it
+           (quail-show-guidance-buf)
+         ;; Make sure the height of the guidance window is OK --
+         ;; sometimes, if the minibuffer window expands due to user
+         ;; input (for instance if the newly inserted character is in a
+         ;; different font), it will cause the guidance window to be
+         ;; only partially visible.  We force a redisplay first because
+         ;; this automatic expansion doesn't happen until then, and we
+         ;; want to see the window sizes after the expansion.
+         (sit-for 0)
+         (set-window-text-height quail-guidance-win 1))
        (cond ((or (eq guidance t)
                   (consp guidance))
               ;; Show the current possible translations.