]> code.delx.au - gnu-emacs-elpa/blobdiff - company.el
Calculate window line number faster.
[gnu-emacs-elpa] / company.el
index e098327ca14b9261106cbc90126a26e3a5f1e8c0..45a94d8087a682818326193689cfb3d9985f8d06 100644 (file)
 (defsubst company-pseudo-tooltip-height ()
   "Calculate the appropriate tooltip height."
   (max 3 (min company-tooltip-limit
-              (- (window-height) (cdr (posn-col-row (posn-at-point))) 2))))
+              (- (window-height) 2
+                 (count-lines (window-start) (point-at-bol))))))
 
 (defun company-pseudo-tooltip-show (row column selection)
   (company-pseudo-tooltip-hide)