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

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

[elpa] master 39eb115 113/173: company--posn-col-row: Fall back to posn-


From: Dmitry Gutov
Subject: [elpa] master 39eb115 113/173: company--posn-col-row: Fall back to posn-col-row
Date: Thu, 23 Jun 2016 00:28:43 +0000 (UTC)

branch: master
commit 39eb1158909bae3754d24f00437a2e8e969ac573
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    company--posn-col-row: Fall back to posn-col-row
    
    #455
---
 company.el |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/company.el b/company.el
index 1b3a442..f83eeb4 100644
--- a/company.el
+++ b/company.el
@@ -805,7 +805,9 @@ means that `company-mode' is always turned on except in 
`message-mode' buffers."
   (let ((col (car (posn-col-row posn)))
         ;; `posn-col-row' doesn't work well with lines of different height.
         ;; `posn-actual-col-row' doesn't handle multiple-width characters.
-        (row (cdr (posn-actual-col-row posn))))
+        (row (cdr (or (posn-actual-col-row posn)
+                      ;; When position is non-visible for some reason.
+                      (posn-col-row posn)))))
     (when (and header-line-format (version< emacs-version "24.3.93.3"))
       ;; http://debbugs.gnu.org/18384
       (cl-decf row))



reply via email to

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