branch: externals/company
commit f3ee625daadbff704b620a25c7cdd216a28f2eb5
Author: Dmitry Gutov <[email protected]>
Commit: Dmitry Gutov <[email protected]>
Don't show the (auto) doc buffer when no doc
https://github.com/company-mode/company-mode/discussions/1404
---
company.el | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/company.el b/company.el
index ab2f0bec72..73f596c987 100644
--- a/company.el
+++ b/company.el
@@ -2227,7 +2227,9 @@ For more details see `company-insertion-on-trigger' and
(progn
(company-call-frontends 'post-command)
(when company-auto-update-doc
- (company-show-doc-buffer)))
+ (condition-case nil
+ (company-show-doc-buffer)
+ (user-error nil))))
(let ((delay (company--idle-delay)))
(and (numberp delay)
(not defining-kbd-macro)
@@ -2862,11 +2864,7 @@ from the candidates list.")
(selection (or company-selection 0)))
(let* ((selected (nth selection company-candidates))
(doc-buffer (or (company-call-backend 'doc-buffer selected)
- (if company-auto-update-doc
- (company-doc-buffer
- (format "%s: No documentation available"
- selected))
- (user-error "No documentation available"))))
+ (user-error "No documentation available")))
start)
(when (consp doc-buffer)
(setq start (cdr doc-buffer)