branch: master
commit b055f132be939443dfc2801d587239e547a1b6f9
Author: Noam Postavsky <[email protected]>
Commit: Noam Postavsky <[email protected]>
Fix #617; ensure point is visible before x prompt
* yasnippet.el (yas-x-prompt): Call redisplay.
---
yasnippet.el | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
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)