]> code.delx.au - gnu-emacs-elpa/commitdiff
company--posn-col-row: Fall back to posn-col-row
authorDmitry Gutov <dgutov@yandex.ru>
Wed, 13 Jan 2016 08:27:00 +0000 (11:27 +0300)
committerDmitry Gutov <dgutov@yandex.ru>
Wed, 13 Jan 2016 08:27:00 +0000 (11:27 +0300)
#455

company.el

index 1b3a4429eced18ad0bf9e781a94d1cc9f3977d08..f83eeb45a3704d97295e75c6fbdf2f409b774192 100644 (file)
@@ -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))