From b055f132be939443dfc2801d587239e547a1b6f9 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Wed, 21 Oct 2015 18:39:40 -0400 Subject: [PATCH] Fix #617; ensure point is visible before x prompt * yasnippet.el (yas-x-prompt): Call redisplay. --- yasnippet.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/yasnippet.el b/yasnippet.el index 77702eb..f13dc4f 100644 --- a/yasnippet.el +++ b/yasnippet.el @@ -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)