[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/company 277640481a 19/30: Render the "preview" overlay
From: |
ELPA Syncer |
Subject: |
[elpa] externals/company 277640481a 19/30: Render the "preview" overlay over the matching suffix text |
Date: |
Sat, 13 Jul 2024 00:57:51 -0400 (EDT) |
branch: externals/company
commit 277640481a8dec0e341fa4b5dc833d79d5ad1183
Author: Dmitry Gutov <dmitry@gutov.dev>
Commit: Dmitry Gutov <dmitry@gutov.dev>
Render the "preview" overlay over the matching suffix text
Rather than cutting the overlay itself shorter.
#1106 #340
---
company.el | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/company.el b/company.el
index f35fb96131..a8b6416aae 100644
--- a/company.el
+++ b/company.el
@@ -4262,11 +4262,6 @@ Delay is determined by `company-tooltip-idle-delay'."
(company-strip-prefix completion prefix)
completion))
- (setq completion (if (string-suffix-p suffix completion)
- (substring completion 0 (- (length completion)
- (length suffix)))
- completion))
-
(when (string-prefix-p "\n" completion)
(setq completion (concat (propertize " " 'face 'company-preview) "\n"
(substring completion 1))))
@@ -4280,17 +4275,21 @@ Delay is determined by `company-tooltip-idle-delay'."
(ptf-workaround (and
pto
(char-before pos)
- (eq pos (overlay-start pto)))))
+ (eq pos (overlay-start pto))))
+ (end pos))
;; Try to accommodate for the pseudo-tooltip overlay,
;; which may start at the same position if it's at eol.
(when ptf-workaround
(cl-decf beg)
(setq completion (concat (buffer-substring beg pos) completion)))
- (setq company-preview-overlay (make-overlay beg pos))
+ (when (string-suffix-p suffix completion)
+ (cl-incf end (length suffix)))
+
+ (setq company-preview-overlay (make-overlay beg end))
(let ((ov company-preview-overlay))
- (overlay-put ov (if ptf-workaround 'display 'after-string)
+ (overlay-put ov (if (> end beg) 'display 'after-string)
completion)
(overlay-put ov 'window (selected-window))))))
- [elpa] externals/company ff6107bde3 04/30: company-inhibit-inside-symbols: New option, (continued)
- [elpa] externals/company ff6107bde3 04/30: company-inhibit-inside-symbols: New option, ELPA Syncer, 2024/07/13
- [elpa] externals/company 426e1830ff 06/30: company--unique-match-p: Also include suffix, ELPA Syncer, 2024/07/13
- [elpa] externals/company d7e77b9673 01/30: #1106 #340 Complete inside symbols, ELPA Syncer, 2024/07/13
- [elpa] externals/company 7ed2baeedd 05/30: Merge branch 'master' into completion_inside_symbol, ELPA Syncer, 2024/07/13
- [elpa] externals/company ebe5244443 07/30: Merge branch 'master' into completion_inside_symbol, ELPA Syncer, 2024/07/13
- [elpa] externals/company 10fcb21d46 09/30: Remove suffix after completion by company-dabbrev-code too, ELPA Syncer, 2024/07/13
- [elpa] externals/company 2fefdc7ce3 02/30: Fix test failures, ELPA Syncer, 2024/07/13
- [elpa] externals/company 436b0d6247 10/30: New backend command `adjust-boundaries`, ELPA Syncer, 2024/07/13
- [elpa] externals/company 477799b362 18/30: Make suffix matching use "proper suffix" logic by default, ELPA Syncer, 2024/07/13
- [elpa] externals/company a011dbd892 27/30: Update company-files tests, ELPA Syncer, 2024/07/13
- [elpa] externals/company 277640481a 19/30: Render the "preview" overlay over the matching suffix text,
ELPA Syncer <=
- [elpa] externals/company 54b0148ce4 16/30: Fix bytecomp warnings, ELPA Syncer, 2024/07/13
- [elpa] externals/company d4e01ed948 21/30: #1474 change the reference in NEWS, ELPA Syncer, 2024/07/13
- [elpa] externals/company 31f7ad52e4 30/30: Merge pull request #1474 from company-mode/completion_inside_symbol, ELPA Syncer, 2024/07/13
- [elpa] externals/company a253fa5505 25/30: company-files--prefix: Capture suffix as well, ELPA Syncer, 2024/07/13
- [elpa] externals/company bbe0bc031a 13/30: company--multi-backend-adapter: Support suffix and `adjust-boundaries`, ELPA Syncer, 2024/07/13
- [elpa] externals/company c8a06ff3bf 11/30: Support completion styles in company-etags too, ELPA Syncer, 2024/07/13
- [elpa] externals/company a986091380 20/30: Fix test failures, ELPA Syncer, 2024/07/13
- [elpa] externals/company 0503adea94 22/30: company-dabbrev: Also support completion inside a word, ELPA Syncer, 2024/07/13
- [elpa] externals/company 6f54897015 15/30: Fix remaining failure, ELPA Syncer, 2024/07/13
- [elpa] externals/company c987a27148 24/30: company-files: Use the `adjust-boundaries` action, ELPA Syncer, 2024/07/13