[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 16/52: Introduce company-tooltip-flip-when-above
From: |
Dmitry Gutov |
Subject: |
[elpa] 16/52: Introduce company-tooltip-flip-when-above |
Date: |
Tue, 01 Jul 2014 11:53:12 +0000 |
dgutov pushed a commit to branch master
in repository elpa.
commit 660b65e552ae1da305e3cd3f14ebc6fbc4f9cbc4
Author: Dmitry Gutov <address@hidden>
Date: Thu May 29 02:54:09 2014 +0300
Introduce company-tooltip-flip-when-above
Closes #116
---
NEWS.md | 1 +
company.el | 7 +++++++
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/NEWS.md b/NEWS.md
index 6206a36..6db3e21 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -3,6 +3,7 @@
## Next
* `company-clang` uses the standard header search paths by default.
+* New user option `company-tooltip-flip-when-above`.
## 2014-04-19 (0.8.0)
diff --git a/company.el b/company.el
index 580304e..bbe15c1 100644
--- a/company.el
+++ b/company.el
@@ -264,6 +264,10 @@ This doesn't include the margins and the scroll bar."
"When non-nil, align annotations to the right tooltip border."
:type 'boolean)
+(defcustom company-tooltip-flip-when-above nil
+ "Whether to flip the tooltip when it's above the current line."
+ :type 'boolean)
+
(defvar company-safe-backends
'((company-abbrev . "Abbrev")
(company-bbdb . "BBDB")
@@ -2121,6 +2125,9 @@ If SHOW-VERSION is non-nil, show the version in the echo
area."
(defun company--replacement-string (lines old column nl &optional align-top)
(cl-decf column company-tooltip-margin)
+ (when (and align-top company-tooltip-flip-when-abovex)
+ (setq lines (reverse lines)))
+
(let ((width (length (car lines)))
(remaining-cols (- (+ (company--window-width) (window-hscroll))
column)))
- [elpa] 08/52: company-search-map: bind DEL to company-search-other-char, (continued)
- [elpa] 08/52: company-search-map: bind DEL to company-search-other-char, Dmitry Gutov, 2014/07/01
- [elpa] 07/52: Account for the line continuation column in graphical mode, Dmitry Gutov, 2014/07/01
- [elpa] 09/52: company-sort-by-occurrence: include words on the same line, too, Dmitry Gutov, 2014/07/01
- [elpa] 06/52: Merge pull request #106 from proofit404/master, Dmitry Gutov, 2014/07/01
- [elpa] 11/52: company-clang--build-complete-args: don't call -cc1 directly, Dmitry Gutov, 2014/07/01
- [elpa] 10/52: company--multi-backend-adapter-candidates: compare string values of prefix, Dmitry Gutov, 2014/07/01
- [elpa] 12/52: company-clang--annotation: include method qualifiers in the annotation, Dmitry Gutov, 2014/07/01
- [elpa] 13/52: NEWS: document the change in clang invocation, Dmitry Gutov, 2014/07/01
- [elpa] 14/52: company--continue: don't pass the new prefix to `company-cancel', Dmitry Gutov, 2014/07/01
- [elpa] 15/52: company-files-complete: move files in subdirs to the end, Dmitry Gutov, 2014/07/01
- [elpa] 16/52: Introduce company-tooltip-flip-when-above,
Dmitry Gutov <=
- [elpa] 17/52: Fix typo, Dmitry Gutov, 2014/07/01
- [elpa] 18/52: extended gtags functionality #90 showing annotations and meta, Dmitry Gutov, 2014/07/01
- [elpa] 21/52: Merge pull request #126 from ksjogo/gtags, Dmitry Gutov, 2014/07/01
- [elpa] 19/52: fixing let in gtags annotation, Dmitry Gutov, 2014/07/01
- [elpa] 20/52: Add new possible value to `company-dabbrev-code-other-buffers', Dmitry Gutov, 2014/07/01
- [elpa] 03/52: company-clang: don't mistake scoping operator for objc args, Dmitry Gutov, 2014/07/01
- [elpa] 24/52: Merge pull request #127 from bbatsov/doc-fixes, Dmitry Gutov, 2014/07/01
- [elpa] 23/52: Small fixes, Dmitry Gutov, 2014/07/01
- [elpa] 25/52: Some indentation fixes, Dmitry Gutov, 2014/07/01
- [elpa] 27/52: Merge pull request #128 from bbatsov/defvar-local, Dmitry Gutov, 2014/07/01