Skip to content

Commit e47ea29

Browse files
authored
lsp-completion: dont use company's specific variable for checking auto trigger char (#4432)
1 parent e379ae5 commit e47ea29

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lsp-completion.el

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -525,8 +525,11 @@ The MARKERS and PREFIX value will be attached to each candidate."
525525
:company-require-match 'never
526526
:company-prefix-length
527527
(save-excursion
528-
(defvar company-minimum-prefix-length)
529-
(let ((bounds-left (max (line-beginning-position) (- (point) company-minimum-prefix-length)))
528+
(let (
529+
;; 2 is a heuristic number to make sure we look futher back than
530+
;; the bounds-start, which can be different from the actual start
531+
;; of the symbol
532+
(bounds-left (max (line-beginning-position) (- bounds-start 2)))
530533
triggered-by-char?)
531534
(while (and (> (point) bounds-left)
532535
(not (equal (char-after) ?\s))

0 commit comments

Comments
 (0)