Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update frame's background #172

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion company-box.el
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
;; Author: Sebastien Chapuis <[email protected]>
;; URL: https://github.com/sebastiencs/company-box
;; Keywords: company, completion, front-end, convenience
;; Package-Requires: ((emacs "26.0.91") (dash "2.13") (dash-functional "1.2.0") (company "0.9.6") (frame-local "0.0.1"))
;; Package-Requires: ((emacs "26.0.91") (dash "2.19.0") (company "0.9.6") (frame-local "0.0.1"))
;; Version: 0.0.1

;;; License
Expand Down Expand Up @@ -632,6 +632,10 @@ It doesn't nothing if a font icon is used."
(right-fringe . 0)
(left-fringe . 0)))))

(defun company-box--update-frame-background (frame)
(with-selected-frame frame
(set-background-color (face-background 'company-tooltip nil t))))

(defun company-box--display (string on-update)
"Display the completions."
(company-box--render-buffer string on-update)
Expand All @@ -640,6 +644,7 @@ It doesn't nothing if a font icon is used."
(company-box--compute-frame-position (company-box--get-frame))
(company-box--move-selection t)
(company-box--update-frame-position (company-box--get-frame))
(company-box--update-frame-background (company-box--get-frame))
(unless (frame-visible-p (company-box--get-frame))
(make-frame-visible (company-box--get-frame)))
(company-box--update-scrollbar (company-box--get-frame) t)
Expand Down