mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-13 21:13:04 +00:00
Fix edge case in yas-longest-key-from-whitespace
* yasnippet.el (yas-longest-key-from-whitespace): don't try again if start-point is on whitespace. * yasnippet-tests.el (complicated-yas-key-syntaxes): check edge case.
This commit is contained in:
parent
47a3d5f1cb
commit
d982b701fc
@ -351,7 +351,8 @@ TODO: correct this bug!"
|
||||
(yas--foobarbaz t) (yas--barbaz t))
|
||||
(yas-should-expand '(("foo-barbaz" . "foo-barOKbazOK")))
|
||||
(setq yas-key-syntaxes '(yas-longest-key-from-whitespace))
|
||||
(yas-should-expand '(("foo-barbaz" . "OKfoo-barbazOK"))))))))
|
||||
(yas-should-expand '(("foo-barbaz" . "OKfoo-barbazOK")
|
||||
("foo " . "foo "))))))))
|
||||
|
||||
|
||||
;;; Loading
|
||||
|
@ -2749,7 +2749,7 @@ marks it as something else (typically comment ender)."
|
||||
(if (= (point) start-point)
|
||||
(yas-try-key-from-whitespace start-point)
|
||||
(forward-char))
|
||||
(unless (= original (1+ (point)))
|
||||
(unless (<= start-point (1+ (point)))
|
||||
'again))
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user