dgutov pushed a commit to branch master
in repository elpa.
commit 6d94a36dcc5f9bf5af87fdbf36d4135607c0ca8c
Author: Dmitry Gutov <[email protected]>
Date: Sat Feb 1 07:37:11 2014 +0200
company-sort-by-occurrence: consider the preceding line
---
company.el | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/company.el b/company.el
index 14d92a1..dffe7e0 100644
--- a/company.el
+++ b/company.el
@@ -945,8 +945,8 @@ Keywords and function definition names are ignored."
(lambda (candidate)
(when (or
(save-excursion
- (and (zerop (forward-line -1))
- (search-backward candidate (window-start) t)))
+ (progn (forward-line 0)
+ (search-backward candidate (window-start) t)))
(save-excursion
(search-forward candidate (window-end) t)))
(let ((beg (match-beginning 0))