diff options
author | David Lattimore <[email protected]> | 2020-07-22 06:00:28 +0100 |
---|---|---|
committer | David Lattimore <[email protected]> | 2020-07-24 12:34:00 +0100 |
commit | 3975952601888d9f77e466c12e8e389748984b33 (patch) | |
tree | e599abf34b90be63e091ea78bfa58fe46cf1b81a /crates/ra_ide/src/lib.rs | |
parent | 02fc3d50ee4d179cc5a443a790544c2a5e439cb0 (diff) |
SSR: Pass current file position through to SSR code.
In a subsequent commit, it will be used for resolving paths.
Diffstat (limited to 'crates/ra_ide/src/lib.rs')
-rw-r--r-- | crates/ra_ide/src/lib.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/ra_ide/src/lib.rs b/crates/ra_ide/src/lib.rs index dc9192d42..7356e947b 100644 --- a/crates/ra_ide/src/lib.rs +++ b/crates/ra_ide/src/lib.rs | |||
@@ -505,9 +505,10 @@ impl Analysis { | |||
505 | &self, | 505 | &self, |
506 | query: &str, | 506 | query: &str, |
507 | parse_only: bool, | 507 | parse_only: bool, |
508 | position: FilePosition, | ||
508 | ) -> Cancelable<Result<SourceChange, SsrError>> { | 509 | ) -> Cancelable<Result<SourceChange, SsrError>> { |
509 | self.with_db(|db| { | 510 | self.with_db(|db| { |
510 | let edits = ssr::parse_search_replace(query, parse_only, db)?; | 511 | let edits = ssr::parse_search_replace(query, parse_only, db, position)?; |
511 | Ok(SourceChange::from(edits)) | 512 | Ok(SourceChange::from(edits)) |
512 | }) | 513 | }) |
513 | } | 514 | } |