mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-11-22 12:34:39 +00:00
feat: prefer to select the previous token when cursor is before a marker (#1175)
* feat: prefer to select the previous token when cursor is before a marker * test: update snapshot
This commit is contained in:
parent
0aafee1d13
commit
faf807edb2
6 changed files with 26 additions and 13 deletions
|
|
@ -42,7 +42,7 @@ impl StatefulRequest for RenameRequest {
|
|||
doc: Option<VersionedDocument>,
|
||||
) -> Option<Self::Response> {
|
||||
let source = ctx.source_by_path(&self.path).ok()?;
|
||||
let syntax = ctx.classify_pos(&source, self.position, 1)?;
|
||||
let syntax = ctx.classify_for_decl(&source, self.position)?;
|
||||
|
||||
let def = ctx.def_of_syntax(&source, doc.as_ref(), syntax.clone())?;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue