Fix #4000: company-box breaks if frames are deleted
Company-box doesn't perform frame-live-p checks before trying to use its childframes, so any operation that cleans up the current session (like `SPC TAB x`) would break it. Should be fixed upstream.
This commit is contained in:
parent
2f91183e48
commit
15d976142c
1 changed files with 14 additions and 1 deletions
|
@ -127,7 +127,20 @@
|
||||||
https://github.com/sebastiencs/company-box/issues/44"
|
https://github.com/sebastiencs/company-box/issues/44"
|
||||||
:around #'company-box--update-scrollbar
|
:around #'company-box--update-scrollbar
|
||||||
(letf! ((#'display-buffer-in-side-window #'ignore))
|
(letf! ((#'display-buffer-in-side-window #'ignore))
|
||||||
(apply orig-fn args))))
|
(apply orig-fn args)))
|
||||||
|
|
||||||
|
;; `company-box' performs insufficient frame-live-p checks. Any command that
|
||||||
|
;; "cleans up the session" will break company-box.
|
||||||
|
;; TODO Fix this upstream.
|
||||||
|
(defadvice! +company-box-detect-deleted-frame-a (frame)
|
||||||
|
:filter-return #'company-box--get-frame
|
||||||
|
(if (frame-live-p frame) frame))
|
||||||
|
(defadvice! +company-box-detect-deleted-doc-frame-a (_selection frame)
|
||||||
|
:before #'company-box-doc
|
||||||
|
(and company-box-doc-enable
|
||||||
|
(frame-local-getq company-box-doc-frame frame)
|
||||||
|
(not (frame-live-p (frame-local-getq company-box-doc-frame frame)))
|
||||||
|
(frame-local-setq company-box-doc-frame nil frame))))
|
||||||
|
|
||||||
|
|
||||||
(use-package! company-dict
|
(use-package! company-dict
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue