From 887c3363dc4f1ffb8cff5405bb9a9f5122aed1ff Mon Sep 17 00:00:00 2001 From: Nikolaj Schumacher Date: Mon, 16 Mar 2009 14:25:27 +0100 Subject: [PATCH] Fixed accidental "...". --- company-elisp.el | 3 ++- company.el | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/company-elisp.el b/company-elisp.el index 231446b7f..5ec3b0a81 100644 --- a/company-elisp.el +++ b/company-elisp.el @@ -48,7 +48,8 @@ (ignore-errors (dotimes (i company-elisp-parse-limit) (save-excursion - (down-list 1) + (when (looking-at "[ \t\n]*(") + (down-list 1)) (if (looking-at "[ \t\n]*\\(\\(?:\\sw\\|\\s_\\)+\\)") (add-to-list 'vars (match-string-no-properties 1)) (error))) diff --git a/company.el b/company.el index 92e357a8f..98b9dcd3e 100644 --- a/company.el +++ b/company.el @@ -513,7 +513,10 @@ (when (>= company-tooltip-offset (- num-lines limit 1)) (incf limit) (when (= selection (1- num-lines)) - (setq company-tooltip-offset (max (1- company-tooltip-offset) 0)))) + (decf company-tooltip-offset) + (when (<= company-tooltip-offset 1) + (setq company-tooltip-offset 0) + (incf limit)))) limit) -- 2.39.2