[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/company a986091380 20/30: Fix test failures
From: |
ELPA Syncer |
Subject: |
[elpa] externals/company a986091380 20/30: Fix test failures |
Date: |
Sat, 13 Jul 2024 00:57:52 -0400 (EDT) |
branch: externals/company
commit a986091380aff0311c4c09a0ef5f2ff9fb8fce32
Author: Dmitry Gutov <dmitry@gutov.dev>
Commit: Dmitry Gutov <dmitry@gutov.dev>
Fix test failures
#1106 #340
---
company.el | 5 +++--
test/frontends-tests.el | 8 ++++++--
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/company.el b/company.el
index a8b6416aae..4e94becd99 100644
--- a/company.el
+++ b/company.el
@@ -2452,10 +2452,11 @@ For more details see `company-insertion-on-trigger' and
(company-call-backend 'ignore-case))))
(defun company--boundaries (&optional candidate)
+ (unless candidate
+ (setq candidate (nth (or company-selection 0) company-candidates)))
(or
(company-call-backend 'adjust-boundaries
- (or candidate
- (nth (or company-selection 0) company-candidates))
+ candidate
company-prefix company-suffix)
(and
;; Default to replacing the suffix only if the completion ends with it.
diff --git a/test/frontends-tests.el b/test/frontends-tests.el
index 54db7654d8..ac084e8281 100644
--- a/test/frontends-tests.el
+++ b/test/frontends-tests.el
@@ -32,7 +32,7 @@
(company-begin-commands '(self-insert-command))
(company-backends
(list (lambda (c &rest _)
- (cl-case c (prefix "") (candidates '("a" "b" "c")))))))
+ (cl-case c (prefix '("" "")) (candidates '("a" "b"
"c")))))))
(let (this-command)
(company-call 'complete))
(company-call 'open-line 1)
@@ -102,7 +102,8 @@
(set-window-buffer nil (current-buffer))
(save-excursion (insert "\n"))
(let ((company-backend #'ignore)
- (company-prefix ""))
+ (company-prefix "")
+ (company-suffix ""))
(company-preview-show-at-point (point) "123")
(let* ((ov company-preview-overlay)
(str (overlay-get ov 'after-string)))
@@ -250,18 +251,21 @@
(company-tooltip-margin 1)
(company-backend #'ignore))
(let* ((company-common (make-string (- ww 3) ?1))
+ (company-suffix "")
(company-candidates `(,(concat company-common "2")
,(concat company-common "3"))))
(should (equal (list (format " %s2 " (make-string (- ww 3) ?1))
(format " %s3 " (make-string (- ww 3) ?1)))
(cdr (company--create-lines 0 999)))))
(let* ((company-common (make-string (- ww 2) ?1))
+ (company-suffix "")
(company-candidates `(,(concat company-common "2")
,(concat company-common "3"))))
(should (equal (list (format " %s " company-common)
(format " %s " company-common))
(cdr (company--create-lines 0 999)))))
(let* ((company-common (make-string ww ?1))
+ (company-suffix "")
(company-candidates `(,(concat company-common "2")
,(concat company-common "3")))
(res (cdr (company--create-lines 0 999))))
- [elpa] externals/company 436b0d6247 10/30: New backend command `adjust-boundaries`, (continued)
- [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, 2024/07/13
- [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 <=
- [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
- [elpa] externals/company bc52a6136e 17/30: Strip the matching suffix in preview too, ELPA Syncer, 2024/07/13
- [elpa] externals/company ec587719e3 12/30: company-etags: CAPF match highlighting, ELPA Syncer, 2024/07/13
- [elpa] externals/company 92ebedd921 28/30: Better summary, fixed url, ELPA Syncer, 2024/07/13
- [elpa] externals/company 21bfd9cbc7 29/30: Fix "sneaky refresh" when boundaries are used, ELPA Syncer, 2024/07/13
- [elpa] externals/company 0de16299dc 26/30: Make sure to redraw popup when boundaries change, ELPA Syncer, 2024/07/13