Fix company in non-fci buffers
This commit is contained in:
parent
94aad9cdb4
commit
ec1a9aa30c
1 changed files with 16 additions and 3 deletions
|
@ -665,9 +665,22 @@ MODE1 is enabled and vice-versa."
|
|||
;; when it finishes or is cancelled. This is to work around a
|
||||
;; long-standing incompatibility between company (as well as
|
||||
;; auto-complete) and fill-column-indicator.
|
||||
(add-hook 'company-completion-started-hook (lambda (&rest _) (fci-mode -1)))
|
||||
(add-hook 'company-completion-cancelled-hook (lambda (&rest _) (fci-mode 1)))
|
||||
(add-hook 'company-completion-finished-hook (lambda (&rest _) (fci-mode 1)))
|
||||
(defvar-local oni:company-fci-enabled-p nil)
|
||||
(add-hook 'company-completion-started-hook
|
||||
(lambda (&rest _)
|
||||
(when fci-mode
|
||||
(setq-local oni:company-fci-enabled-p t)
|
||||
(fci-mode -1))))
|
||||
(add-hook 'company-completion-cancelled-hook
|
||||
(lambda (&rest _)
|
||||
(when oni:company-fci-enabled-p
|
||||
(fci-mode 1)
|
||||
(setq-local oni:company-fci-enabled-p nil))))
|
||||
(add-hook 'company-completion-finished-hook
|
||||
(lambda (&rest _)
|
||||
(when oni:company-fci-enabled-p
|
||||
(fci-mode 1)
|
||||
(setq-local oni:company-fci-enabled-p nil))))
|
||||
|
||||
;; Load my theme
|
||||
(if (daemonp)
|
||||
|
|
Loading…
Reference in a new issue