branch: externals/company
commit 539ead020551884defe9f4453d0bce575024caeb
Author: Dmitry Gutov <[email protected]>
Commit: Dmitry Gutov <[email protected]>

    company-sort-by-occurrence: Don't search before the current field
    
    Also mostly important for the minibuffer
---
 company.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/company.el b/company.el
index 2f55b3b74f..86e4aa4586 100644
--- a/company.el
+++ b/company.el
@@ -2264,7 +2264,7 @@ Searches for each in the currently visible part of the 
current buffer and
 prioritizes the matches according to `company-occurrence-weight-function'.
 The rest of the list is appended unchanged.
 Keywords and function definition names are ignored."
-  (let* ((w-start (window-start))
+  (let* ((w-start (max (window-start) (field-beginning)))
          (w-end (window-end))
          (start-point (point))
          occurs

Reply via email to