Fix error handling in crofu-terminal-popupinfo.el
This commit is contained in:
parent
ac07328aca
commit
998d5cf3fa
@ -87,7 +87,9 @@ As this is :around advice, OLDFUN is the real (advised) function to call."
|
||||
(goto-char (point-min))
|
||||
(put-text-property (point-min) (point-max) 'face 'corfu-popupinfo)
|
||||
(when-let ((m (memq 'corfu-default (alist-get 'default face-remapping-alist))))
|
||||
(setcar m 'corfu-popupinfo)))))
|
||||
(setcar m 'corfu-popupinfo)))
|
||||
;; We succeeded in loading the data
|
||||
t))
|
||||
|
||||
(defun ctp--popon-position (buffer)
|
||||
"Find a good position to open the popon for BUFFER's content.
|
||||
@ -201,10 +203,12 @@ CANDIDATE is the same as for `corfu-popupinfo--show'. As this is meant to be
|
||||
(not (corfu--equal-including-properties
|
||||
candidate corfu-popupinfo--candidate)))
|
||||
(let ((buf (ctp--get-buffer)))
|
||||
(ctp--load-content candidate buf)
|
||||
(ctp--display-buffer buf))
|
||||
(if (ctp--load-content candidate buf)
|
||||
(progn
|
||||
(ctp--display-buffer buf)
|
||||
(setq corfu-popupinfo--candidate candidate
|
||||
corfu-popupinfo--toggle t))))
|
||||
corfu-popupinfo--toggle t))
|
||||
(corfu-popupinfo--hide))))))
|
||||
|
||||
(defun ctp--move-away-from-eob ()
|
||||
"Ensure the point isn't too close to the end of the buffer."
|
||||
|
Loading…
Reference in New Issue
Block a user