[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/company a6a27340e3 08/24: company-safe-pixel-substring:
|
From: |
ELPA Syncer |
|
Subject: |
[elpa] externals/company a6a27340e3 08/24: company-safe-pixel-substring: Handle characters near eol better |
|
Date: |
Mon, 6 Nov 2023 09:57:37 -0500 (EST) |
branch: externals/company
commit a6a27340e35e7f063a1b79c096015e20844597a3
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>
company-safe-pixel-substring: Handle characters near eol better
Previously, it could cut them off too eagerly, if the line contains wide
chars.
#1388
---
company.el | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/company.el b/company.el
index 418c3c65c7..14631b269a 100644
--- a/company.el
+++ b/company.el
@@ -2823,19 +2823,21 @@ from the candidates list.")
spw-from spw-to
spw-from-prev
front back)
- (while (and (<= from-chars lstr)
- (>
- (setq spw-from
- (company--string-pixel-width (substring str 0
from-chars)))
- from))
+ (when (> from-chars lstr)
+ (setq from-chars lstr))
+ (while (>
+ (setq spw-from
+ (company--string-pixel-width (substring str 0 from-chars)))
+ from)
(setq spw-from-prev spw-from)
(cl-decf from-chars))
(if (>= from-chars lstr)
(if to
(propertize " " 'display `(space . (:width (,(- to from)))))
"")
+ (when (and to-chars (> to-chars lstr))
+ (setq to-chars lstr))
(while (and to
- (< to-chars lstr)
(>
(setq spw-to
(company--string-pixel-width (substring str 0
to-chars)))
- [elpa] externals/company updated (66201465a9 -> 4301ea14c5), ELPA Syncer, 2023/11/06
- [elpa] externals/company 4ac63de5d8 06/24: Do a bit less consing, ELPA Syncer, 2023/11/06
- [elpa] externals/company 934a525112 09/24: Add a FIXME, ELPA Syncer, 2023/11/06
- [elpa] externals/company a6a27340e3 08/24: company-safe-pixel-substring: Handle characters near eol better,
ELPA Syncer <=
- [elpa] externals/company 8a53285ca0 01/24: Try to handle widths of CJK characters better, ELPA Syncer, 2023/11/06
- [elpa] externals/company 8b516c547c 12/24: Handle 'invisible' and character composition by using a buffer again, ELPA Syncer, 2023/11/06
- [elpa] externals/company 315741353e 05/24: Restore compatibility with Emacs < 29, ELPA Syncer, 2023/11/06
- [elpa] externals/company 9805c7a37d 03/24: Eliminate some repeat calls, ELPA Syncer, 2023/11/06
- [elpa] externals/company 57b6414a3a 14/24: Merge branch 'master' into cjk-string-width, ELPA Syncer, 2023/11/06
- [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