]> code.delx.au - gnu-emacs-elpa/commitdiff
company-sort-by-occurrence: consider the preceding line
authorDmitry Gutov <dgutov@yandex.ru>
Sat, 1 Feb 2014 05:37:11 +0000 (07:37 +0200)
committerDmitry Gutov <dgutov@yandex.ru>
Sat, 1 Feb 2014 05:38:01 +0000 (07:38 +0200)
company.el

index 14d92a1aeb84c2fbbd1cecc008047162ea9a82ce..dffe7e05a1ac060fb9ea2c3ffc46f6128b3740ba 100644 (file)
@@ -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))