]> code.delx.au - gnu-emacs-elpa/commitdiff
Fix #617; ensure point is visible before x prompt
authorNoam Postavsky <npostavs@users.sourceforge.net>
Wed, 21 Oct 2015 22:39:40 +0000 (18:39 -0400)
committerNoam Postavsky <npostavs@users.sourceforge.net>
Wed, 21 Oct 2015 22:39:40 +0000 (18:39 -0400)
* yasnippet.el (yas-x-prompt): Call redisplay.

yasnippet.el

index 77702eb4931b58af75d5cbd1603d85fd3f8a5e2c..f13dc4f0e8533143c08e707a8d642cb82f2559d6 100644 (file)
@@ -1576,6 +1576,9 @@ Optional PROMPT sets the prompt to use."
 (defun yas-x-prompt (prompt choices &optional display-fn)
   "Display choices in a x-window prompt."
   (when (and window-system choices)
+    ;; Let window position be recalculated to ensure that
+    ;; `posn-at-point' returns non-nil.
+    (redisplay)
     (or
      (x-popup-menu
       (if (fboundp 'posn-at-point)