branch: externals/corfu commit b02b68a2b8972cbb9f56b4f52e79cc778b939609 Author: Daniel Mendler <m...@daniel-mendler.de> Commit: Daniel Mendler <m...@daniel-mendler.de>
Revert "Add optional argument to hack redisplay when move the frame" This reverts commit abe4a14d520c9545f82c38c65ab17fbaca84591f. --- corfu.el | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/corfu.el b/corfu.el index 6cbdde2d18..c1eac3ec24 100644 --- a/corfu.el +++ b/corfu.el @@ -391,14 +391,10 @@ The completion backend can override this with ;; Function adapted from posframe.el by tumashu (defvar x-gtk-resize-child-frames) ;; Not present on non-gtk builds -(defun corfu--make-frame (frame params buffer x y width height - &optional hack-redisplay-p) +(defun corfu--make-frame (frame params buffer x y width height) "Make child frame from BUFFER and show it at X/Y with WIDTH/HEIGHT. -PARAMS are frame parameters and FRAME is the existing frame. - -If the optional argument HACK-REDISPLAY-P is non-nil, -hack redisplay to avoid flicker." +PARAMS are frame parameters and FRAME is the existing frame." (when corfu--frame-timer (cancel-timer corfu--frame-timer) (setq corfu--frame-timer nil)) @@ -454,9 +450,8 @@ hack redisplay to avoid flicker." ;; XXX HACK Avoid flicker when frame is already visible. ;; Redisplay, wait for resize and then move the frame. (unless (equal (frame-position frame) (cons x y)) - (when hack-redisplay-p - (redisplay 'force) - (sleep-for 0.01)) + (redisplay 'force) + (sleep-for 0.01) (set-frame-position frame x y)) ;; XXX HACK: Force redisplay, otherwise the popup sometimes does not ;; display content. @@ -509,8 +504,7 @@ A scroll bar is displayed from LO to LO+BAR." lines "\n")))) (setq corfu--frame (corfu--make-frame corfu--frame corfu--frame-parameters buffer - x y width height - 'hack-redisplay)))) + x y width height)))) (defun corfu--hide-frame-deferred () "Deferred frame hiding."