Fix #617; ensure point is visible before x prompt

* yasnippet.el (yas-x-prompt): Call redisplay.
This commit is contained in:
Noam Postavsky 2015-10-21 18:39:40 -04:00
parent 35642ac007
commit b055f132be

View File

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