[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/company f6b7bc5c35 10/24: Add handling of buffer-invisi
|
From: |
ELPA Syncer |
|
Subject: |
[elpa] externals/company f6b7bc5c35 10/24: Add handling of buffer-invisibility-spec to company-safe-pixel-substring |
|
Date: |
Mon, 6 Nov 2023 09:57:37 -0500 (EST) |
branch: externals/company
commit f6b7bc5c352fed312250f6725700b238c1ea9e28
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>
Add handling of buffer-invisibility-spec to company-safe-pixel-substring
#1388
---
company.el | 13 +++++++++++++
test/frontends-tests.el | 2 +-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/company.el b/company.el
index 21ccb33d8b..8c913cff67 100644
--- a/company.el
+++ b/company.el
@@ -2826,6 +2826,19 @@ from the candidates list.")
spw-from spw-to
spw-from-prev
front back)
+ (when buffer-invisibility-spec
+ (let ((fi 0) (ti 0))
+ (while (<= fi from-chars)
+ (when (and (< from-chars lstr)
+ (get-text-property fi 'invisible str))
+ (cl-incf from-chars))
+ (cl-incf fi))
+ (when to-chars
+ (while (<= ti to-chars)
+ (when (and (< to-chars lstr)
+ (get-text-property ti 'invisible str))
+ (cl-incf to-chars))
+ (cl-incf ti)))))
(when (> from-chars lstr)
(setq from-chars lstr))
(while (>
diff --git a/test/frontends-tests.el b/test/frontends-tests.el
index 0055aed141..3b36e232f3 100644
--- a/test/frontends-tests.el
+++ b/test/frontends-tests.el
@@ -490,7 +490,7 @@
(buffer-invisibility-spec '((outline . t) t)))
(put-text-property 1 2 'invisible 'foo str)
(should (equal
- (company-modify-line str "zz" 4)
+ (company-modify-line str "zz" (* 3 (frame-char-width)))
"-*-fzzbar"))))
(ert-deftest company-scrollbar-bounds ()
- [elpa] externals/company 6c579f7000 13/24: Add new test, for the previous, (continued)
- [elpa] externals/company 6c579f7000 13/24: Add new test, for the previous, ELPA Syncer, 2023/11/06
- [elpa] externals/company ec51f51b22 04/24: Define company-safe-pixel-substring to do more accurate popup positioning, ELPA Syncer, 2023/11/06
- [elpa] externals/company d19d7a7ae7 23/24: Fix CI in Emacs 29, ELPA Syncer, 2023/11/06
- [elpa] externals/company 705af6470b 17/24: Fix an edge case, ELPA Syncer, 2023/11/06
- [elpa] externals/company 6206db868a 18/24: Rewrite company-safe-pixel-substring to make more tests pass in batch, ELPA Syncer, 2023/11/06
- [elpa] externals/company 44dbc23679 07/24: Fix edge case, ELPA Syncer, 2023/11/06
- [elpa] externals/company 5173cc9693 21/24: Fix CI in Emacs 28-, ELPA Syncer, 2023/11/06
- [elpa] externals/company a1ef2a06a0 20/24: Update NEWS, ELPA Syncer, 2023/11/06
- [elpa] externals/company 7a4bc77e1c 16/24: company-pseudo-tooltip-show: Slight performance improvement, ELPA Syncer, 2023/11/06
- [elpa] externals/company 6ff9f054cb 22/24: More fixing of tests, ELPA Syncer, 2023/11/06
- [elpa] externals/company f6b7bc5c35 10/24: Add handling of buffer-invisibility-spec to company-safe-pixel-substring,
ELPA Syncer <=
- [elpa] externals/company fb21b70d97 11/24: Fix tests and indicated regressions, ELPA Syncer, 2023/11/06
- [elpa] externals/company 1276d0ec1c 15/24: Replace default-font-width with frame-char-width inside company-safe-pixel-substring, ELPA Syncer, 2023/11/06
- [elpa] externals/company 87351c2c59 02/24: Use vertical-motion instead of move-to-column, ELPA Syncer, 2023/11/06
- [elpa] externals/company 4301ea14c5 24/24: Merge pull request #1394 from company-mode/cjk-string-width, ELPA Syncer, 2023/11/06
- [elpa] externals/company ff300894a3 19/24: Add a comment, ELPA Syncer, 2023/11/06