emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/company 1276d0ec1c 15/24: Replace default-font-width wi


From: ELPA Syncer
Subject: [elpa] externals/company 1276d0ec1c 15/24: Replace default-font-width with frame-char-width inside company-safe-pixel-substring
Date: Mon, 6 Nov 2023 09:57:38 -0500 (EST)

branch: externals/company
commit 1276d0ec1c9b12a61de064a78c0a0d35ca04808c
Author: Dmitry Gutov <dmitry@gutov.dev>
Commit: Dmitry Gutov <dmitry@gutov.dev>

    Replace default-font-width with frame-char-width inside 
company-safe-pixel-substring
    
    Seems more correct, given how `vertical-motion` is defined.
    
    Although there shouldn't be any practical difference when there's no text 
scaling.
    
    #1388
---
 company.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/company.el b/company.el
index 4e89910ecc..4ef4ccc30b 100644
--- a/company.el
+++ b/company.el
@@ -2946,7 +2946,7 @@ from the candidates list.")
             (setq-local buffer-invisibility-spec bis)
             (set-window-buffer nil (current-buffer) t)
 
-            (vertical-motion (cons (/ from (default-font-width)) 0))
+            (vertical-motion (cons (/ from (frame-char-width)) 0))
             (setq from-chars (point))
             (while (and (<
                          (setq spw-from
@@ -2970,7 +2970,7 @@ from the candidates list.")
                   "")
               (if (not to)
                   (setq to-chars (point-max))
-                (vertical-motion (cons (/ to (default-font-width)) 0))
+                (vertical-motion (cons (/ to (frame-char-width)) 0))
                 (setq to-chars (point))
                 (while (and (not (eolp))
                             (<



reply via email to

[Prev in Thread] Current Thread [Next in Thread]