From 3fd5fd38dfdf85074d96f13d9893cfb479ff0681 Mon Sep 17 00:00:00 2001 From: Nikolaj Schumacher Date: Tue, 14 Apr 2009 12:02:17 +0200 Subject: [PATCH] Fixed issues with tabbar-mode and line-spacing. See also Emacs bug #2993. --- company.el | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/company.el b/company.el index 8aad11614..27c95fb7d 100644 --- a/company.el +++ b/company.el @@ -69,6 +69,7 @@ ;; ;;; Change Log: ;; +;; Fixed issues with tabbar-mode and line-spacing. ;; Performance enhancements. ;; ;; 2009-04-12 (0.3) @@ -1080,8 +1081,8 @@ followed by `company-search-kill-others' after each input." "Select the candidate picked by the mouse." (interactive "e") (when (nth 4 (event-start event)) - (company-set-selection (- (cdr (posn-col-row (event-start event))) - (cdr (posn-col-row (posn-at-point))) + (company-set-selection (- (cdr (posn-actual-col-row (event-start event))) + (cdr (posn-actual-col-row (posn-at-point))) 1)) t)) @@ -1172,7 +1173,7 @@ when the selection has been changed, the selected candidate is completed." `(when (company-manual-begin) (save-window-excursion (let ((height (window-height)) - (row (cdr (posn-col-row (posn-at-point))))) + (row (cdr (posn-actual-col-row (posn-at-point))))) ,@body (and (< (window-height) height) (< (- (window-height) row 2) company-tooltip-limit) @@ -1336,7 +1337,7 @@ Example: (defun company-buffer-lines (beg end) (goto-char beg) - (let ((row (cdr (posn-col-row (posn-at-point)))) + (let ((row (cdr (posn-actual-col-row (posn-at-point)))) lines) (while (and (equal (move-to-window-line (incf row)) row) (<= (point) end)) @@ -1462,8 +1463,9 @@ Example: (overlay-put company-pseudo-tooltip-overlay 'window (selected-window))))) (defun company-pseudo-tooltip-show-at-point (pos) - (let ((col-row (posn-col-row (posn-at-point pos)))) - (company-pseudo-tooltip-show (1+ (cdr col-row)) (car col-row) company-selection))) + (let ((col-row (posn-actual-col-row (posn-at-point pos)))) + (company-pseudo-tooltip-show (1+ (cdr col-row)) (car col-row) + company-selection))) (defun company-pseudo-tooltip-edit (lines selection) (let* ((old-string (overlay-get company-pseudo-tooltip-overlay 'company-old)) -- 2.39.2