[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 23/35: Introduce `company-tooltip-minimum-width'
From: |
Dmitry Gutov |
Subject: |
[elpa] 23/35: Introduce `company-tooltip-minimum-width' |
Date: |
Sat, 19 Apr 2014 10:12:18 +0000 |
dgutov pushed a commit to branch master
in repository elpa.
commit 404b6d5bdaade900455bb2a2a6c46189c3c60510
Author: Dmitry Gutov <address@hidden>
Date: Mon Apr 7 20:40:08 2014 +0300
Introduce `company-tooltip-minimum-width'
Closes #93
---
NEWS.md | 1 +
company.el | 14 ++++++++++----
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/NEWS.md b/NEWS.md
index d0203d8..dafd503 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -2,6 +2,7 @@
## Next
+* New user option `company-tooltip-minimum-width`, by default 0.
* New function `company-grab-symbol-cons`.
* `company-clang` fetches completion candidates asynchronously.
* Added support for asynchronous back-ends (experimental).
diff --git a/company.el b/company.el
index 1c255bf..6e025c5 100644
--- a/company.el
+++ b/company.el
@@ -244,6 +244,11 @@ The visualized data is stored in `company-prefix',
`company-candidates',
If this many lines are not available, prefer to display the tooltip above."
:type 'integer)
+(defcustom company-tooltip-minimum-width 0
+ "The minimum width of the tooltip's inner area.
+This doesn't include the margins and the scroll bar."
+ :type 'integer)
+
(defcustom company-tooltip-margin 1
"Width of margin columns to show around the toolip."
:type 'integer)
@@ -2202,10 +2207,11 @@ If SHOW-VERSION is non-nil, show the version in the
echo area."
width))))
(setq width (min window-width
- (if (and company-show-numbers
- (< company-tooltip-offset 10))
- (+ 2 width)
- width)))
+ (max company-tooltip-minimum-width
+ (if (and company-show-numbers
+ (< company-tooltip-offset 10))
+ (+ 2 width)
+ width))))
;; number can make tooltip too long
(when company-show-numbers
- [elpa] 13/35: Make company-clang work asynchronously, (continued)
- [elpa] 13/35: Make company-clang work asynchronously, Dmitry Gutov, 2014/04/19
- [elpa] 12/35: Remove `company-locate-dominating-file', Dmitry Gutov, 2014/04/19
- [elpa] 16/35: Update NEWS, Dmitry Gutov, 2014/04/19
- [elpa] 17/35: company--merge-async: tweak, Dmitry Gutov, 2014/04/19
- [elpa] 19/35: Move company-elisp require, Dmitry Gutov, 2014/04/19
- [elpa] 14/35: Implement async operation for grouped backends, Dmitry Gutov, 2014/04/19
- [elpa] 18/35: company--force-sync: change calling convention, Dmitry Gutov, 2014/04/19
- [elpa] 20/35: Change the summary, Dmitry Gutov, 2014/04/19
- [elpa] 22/35: company--multi-backend-adapter-candidates: bind backend locally, Dmitry Gutov, 2014/04/19
- [elpa] 21/35: Define and use `company-grab-symbol-cons', Dmitry Gutov, 2014/04/19
- [elpa] 23/35: Introduce `company-tooltip-minimum-width',
Dmitry Gutov <=
- [elpa] 25/35: Make version string compatible with Emacs < 24.4, Dmitry Gutov, 2014/04/19
- [elpa] 24/35: Lower company-idle-delay, Dmitry Gutov, 2014/04/19
- [elpa] 06/35: Drop Emacs 23 compatibility, Dmitry Gutov, 2014/04/19
- [elpa] 11/35: Initial support for asynchonous backends (#62), Dmitry Gutov, 2014/04/19
- [elpa] 26/35: Merge pull request #100 from bbatsov/version-fix, Dmitry Gutov, 2014/04/19
- [elpa] 27/35: Try to use the more up-to-date snapshot packages, Dmitry Gutov, 2014/04/19
- [elpa] 29/35: Merge pull request #101 from bbatsov/master, Dmitry Gutov, 2014/04/19
- [elpa] 15/35: Merge branch 'clang-async', Dmitry Gutov, 2014/04/19
- [elpa] 30/35: Fix the test breakage (probably), Dmitry Gutov, 2014/04/19
- [elpa] 31/35: Introduce company-clang-insert-arguments, Dmitry Gutov, 2014/04/19