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

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

[elpa] externals/company d923b58357 3/7: Fix CI failure


From: ELPA Syncer
Subject: [elpa] externals/company d923b58357 3/7: Fix CI failure
Date: Thu, 9 Nov 2023 21:57:31 -0500 (EST)

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

    Fix CI failure
    
    #1394
---
 company.el | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/company.el b/company.el
index a38fe769c8..880dbe608d 100644
--- a/company.el
+++ b/company.el
@@ -1058,12 +1058,15 @@ means that `company-mode' is always turned on except in 
`message-mode' buffers."
 (declare-function line-number-display-width "indent.c")
 
 (defun company--posn-col-row (posn)
-  (let ((col (car (posn-col-row posn t)))
-        ;; `posn-col-row' doesn't work well with lines of different height.
-        ;; `posn-actual-col-row' doesn't handle multiple-width characters.
-        (row (cdr (or (posn-actual-col-row posn)
-                      ;; When position is non-visible for some reason.
-                      (posn-col-row posn t)))))
+  (let* ((col-row (if (>= emacs-major-version 29)
+                      (posn-col-row posn t)
+                    (posn-col-row posn)))
+         (col (car col-row))
+         ;; `posn-col-row' doesn't work well with lines of different height.
+         ;; `posn-actual-col-row' doesn't handle multiple-width characters.
+         (row (cdr (or (posn-actual-col-row posn)
+                       ;; When position is non-visible for some reason.
+                       col-row))))
     ;; posn-col-row return value relative to the left
     (when (eq (current-bidi-paragraph-direction) 'right-to-left)
       ;; `remap' as 3rd argument to window-body-width is E30+ only :-(



reply via email to

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