Fix - being a word character for selections (#17171)

Co-Authored-By: Mikayla <mikayla@zed.dev>
Co-Authored-By: Nate <nate@zed.dev>

Closes #15606
Closes #13515

Release Notes:

- Fixes `-` being considered a word character for selections in some
languages

Co-authored-by: Mikayla <mikayla@zed.dev>
Co-authored-by: Nate <nate@zed.dev>
This commit is contained in:
Conrad Irwin
2024-08-30 12:34:23 -06:00
committed by GitHub
co-authored by Mikayla Nate
parent c0731bfa28
commit ee6ec50b15
12 changed files with 239 additions and 143 deletions
+1 -1
View File
@@ -613,7 +613,7 @@ pub fn show_link_definition(
TriggerPoint::Text(trigger_anchor) => {
// If no symbol range returned from language server, use the surrounding word.
let (offset_range, _) =
snapshot.surrounding_word(*trigger_anchor);
snapshot.surrounding_word(*trigger_anchor, false);
RangeInEditor::Text(
snapshot.anchor_before(offset_range.start)
..snapshot.anchor_after(offset_range.end),