zed/crates/editor
tims 9487fffc55
Fix snippet completion will be trigger, when certain symbols are pressed (#21578)
Closes #21576

This issue is caused by the fuzzy matching for snippets I added
[here](https://github.com/zed-industries/zed/pull/21524). When
encountering symbols such as `:`, `(`, `.`, etc., the `last_word`
becomes empty, which results in an empty string being passed to
`fuzzy_match`, leading to the return of all templates.

This fix adds an early return when `last_word` is empty.

Release Notes:

- N/A
2024-12-05 09:01:35 +01:00
..
src Fix snippet completion will be trigger, when certain symbols are pressed (#21578) 2024-12-05 09:01:35 +01:00
Cargo.toml
LICENSE-GPL