X-Git-Url: https://code.delx.au/gnu-emacs-elpa/blobdiff_plain/6165cb2d7bfd1ad704436704f2e44a62e9ea3cba..c6d53302b114ba50a8e48ce98b906849fded86f4:/company-yasnippet.el diff --git a/company-yasnippet.el b/company-yasnippet.el index 8dac5e9a7..e5fded4d1 100644 --- a/company-yasnippet.el +++ b/company-yasnippet.el @@ -67,6 +67,8 @@ ;; matches, so the longest prefix with any matches should be the most useful. (cl-loop with tables = (yas--get-snippet-tables) for key-prefix in (company-yasnippet--key-prefixes) + ;; Only consider keys at least as long as the symbol at point. + when (>= (length key-prefix) (length prefix)) thereis (company-yasnippet--completions-for-prefix prefix key-prefix tables))) @@ -132,6 +134,7 @@ shadow backends that come after it. Recommended usages: (unless company-tooltip-align-annotations " -> ") (get-text-property 0 'yas-annotation arg))) (candidates (company-yasnippet--candidates arg)) + (no-cache t) (post-completion (let ((template (get-text-property 0 'yas-template arg)) (prefix-offset (get-text-property 0 'yas-prefix-offset arg)))