ui/popup: fix "back to top level" issue
The popup manager (by default) auto-kills most popup buffers after ~5s (controlled by the :ttl property). However, when backtrace buffers are killed, it calls `top-level`. When the popup manager kills the buffer, this causes janky cursor movement and the message "Back to top level" to be displayed in the minibuffer.
This commit is contained in:
parent
00849c5e1b
commit
e7f492c400
1 changed files with 5 additions and 1 deletions
|
@ -28,7 +28,11 @@ the buffer is visible, then set another timer and try again later."
|
||||||
(when-let (process (get-buffer-process buffer))
|
(when-let (process (get-buffer-process buffer))
|
||||||
(kill-process process))
|
(kill-process process))
|
||||||
(let (kill-buffer-query-functions)
|
(let (kill-buffer-query-functions)
|
||||||
(kill-buffer buffer))))))))))
|
;; HACK The debugger backtrace buffer, when killed, called
|
||||||
|
;; `top-level'. This causes jumpiness when the popup
|
||||||
|
;; manager tries to clean it up.
|
||||||
|
(cl-letf (((symbol-function #'top-level) #'ignore))
|
||||||
|
(kill-buffer buffer)))))))))))
|
||||||
|
|
||||||
(defun +popup--delete-window (window)
|
(defun +popup--delete-window (window)
|
||||||
"Do housekeeping before destroying a popup window.
|
"Do housekeeping before destroying a popup window.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue