[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/company 7d052e1cbb: Work around a bug in window-text-pi
|
From: |
ELPA Syncer |
|
Subject: |
[elpa] externals/company 7d052e1cbb: Work around a bug in window-text-pixel-size |
|
Date: |
Mon, 6 Nov 2023 21:57:37 -0500 (EST) |
branch: externals/company
commit 7d052e1cbb4369c470459e930a309198f8b221a8
Author: Dmitry Gutov <dmitry@gutov.dev>
Commit: Dmitry Gutov <dmitry@gutov.dev>
Work around a bug in window-text-pixel-size
When called at bob with FROM=TO right before an advanced display spec
(e.g. image or align-to), it returns non-nil.
---
company.el | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/company.el b/company.el
index 391f183c66..f75c6686b5 100644
--- a/company.el
+++ b/company.el
@@ -2954,7 +2954,8 @@ from the candidates list.")
(vertical-motion (cons (/ from (frame-char-width)) 0))
(setq from-chars (point))
(setq spw-from
- (car (window-text-pixel-size nil (point-min) (point) 55555)))
+ (if (bobp) 0
+ (car (window-text-pixel-size nil (point-min) (point)
55555))))
(while (and (< spw-from from)
(not (eolp)))
(forward-char 1)
@@ -2971,7 +2972,8 @@ from the candidates list.")
(vertical-motion (cons (/ to (frame-char-width)) 0))
(setq to-chars (point))
(setq spw-to
- (car (window-text-pixel-size nil (point-min) (point)
55555)))
+ (if (bobp) 0
+ (car (window-text-pixel-size nil (point-min) (point)
55555))))
(while (and (< spw-to to)
(not (eolp)))
(setq spw-to-prev spw-to)
| [Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/company 7d052e1cbb: Work around a bug in window-text-pixel-size,
ELPA Syncer <=