[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 66a9e65 15/78: company-tng: Use 'after-string when the pre
From: |
Dmitry Gutov |
Subject: |
[elpa] master 66a9e65 15/78: company-tng: Use 'after-string when the prefix is empty |
Date: |
Sun, 18 Feb 2018 07:40:13 -0500 (EST) |
branch: master
commit 66a9e6540ce20bf75d397924d7760a385b5d9e2f
Author: Nikita Leshenko <address@hidden>
Commit: Nikita Leshenko <address@hidden>
company-tng: Use 'after-string when the prefix is empty
The 'display property only works when an overlay's length is not zero.
There can
be cases where `company-prefix' will be empty (for example, when the
completion
was triggered manually). In that case, use the 'after-string property
instead.
---
company-tng.el | 3 +++
1 file changed, 3 insertions(+)
diff --git a/company-tng.el b/company-tng.el
index c603d50..3996f31 100644
--- a/company-tng.el
+++ b/company-tng.el
@@ -83,6 +83,9 @@ confirm the selection and finish the completion."
(selected (nth company-selection company-candidates))
(prefix (length company-prefix)))
(move-overlay ov (- (point) prefix) (point))
+ (overlay-put ov
+ (if (= prefix 0) 'after-string 'display)
+ (and company-selection-changed selected))
(overlay-put ov 'display (and company-selection-changed selected))))
(hide
(when company-tng--overlay
- [elpa] master 91fc865 07/78: Unread whole command instead of last input, (continued)
- [elpa] master 91fc865 07/78: Unread whole command instead of last input, Dmitry Gutov, 2018/02/18
- [elpa] master c0098af 06/78: Introduce company-tooltip-maximum-width, Dmitry Gutov, 2018/02/18
- [elpa] master fe20376 11/78: company-tng: Function to give sensible default configuration, Dmitry Gutov, 2018/02/18
- [elpa] master e27f0f4 13/78: NEWS: Entry for company-tng, Dmitry Gutov, 2018/02/18
- [elpa] master 0295c8f 20/78: And more, Dmitry Gutov, 2018/02/18
- [elpa] master b07eaf9 17/78: Move the entry up, Dmitry Gutov, 2018/02/18
- [elpa] master 74d85d1 09/78: company-tng: Advice company-select-next to allow unselected state, Dmitry Gutov, 2018/02/18
- [elpa] master 4240367 08/78: company-tng: Implement visualisation and completion, Dmitry Gutov, 2018/02/18
- [elpa] master 1a9f0b8 14/78: company-tng: Kill local overlay variable after completion is done, Dmitry Gutov, 2018/02/18
- [elpa] master a528433 21/78: Fix the link text, Dmitry Gutov, 2018/02/18
- [elpa] master 66a9e65 15/78: company-tng: Use 'after-string when the prefix is empty,
Dmitry Gutov <=
- [elpa] master 44b19b6 19/78: Tweak some more, Dmitry Gutov, 2018/02/18
- [elpa] master afa592d 18/78: Rewrite the tng documentation a bit, Dmitry Gutov, 2018/02/18
- [elpa] master eaddef4 22/78: company-tng: Remove redundant call to overlay-put, Dmitry Gutov, 2018/02/18
- [elpa] master 4c1fd0e 16/78: Merge pull request #706 from nikital/company-tng, Dmitry Gutov, 2018/02/18
- [elpa] master 096991d 26/78: Merge pull request #716 from jeffersoncarpenter/master, Dmitry Gutov, 2018/02/18
- [elpa] master 3d9272d 23/78: company-tng: Fully replace default frontend list, Dmitry Gutov, 2018/02/18
- [elpa] master 99fa5a0 30/78: Refine col-row calculation in the presence of line numbering, Dmitry Gutov, 2018/02/18
- [elpa] master 8dea612 39/78: Merge pull request #740 from Havner/master, Dmitry Gutov, 2018/02/18
- [elpa] master a4e14ed 40/78: Add some Commentary, Dmitry Gutov, 2018/02/18
- [elpa] master a574418 46/78: Fix last change, Dmitry Gutov, 2018/02/18