From 95f8310514238fc2c3b4d1ddecbd1b79d2c963a2 Mon Sep 17 00:00:00 2001 From: David Lattimore Date: Tue, 30 Jun 2020 15:55:20 +1000 Subject: Structured search debugging --- crates/ra_ssr/src/replacing.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'crates/ra_ssr/src/replacing.rs') diff --git a/crates/ra_ssr/src/replacing.rs b/crates/ra_ssr/src/replacing.rs index 70ce1c185..e43cc5167 100644 --- a/crates/ra_ssr/src/replacing.rs +++ b/crates/ra_ssr/src/replacing.rs @@ -21,8 +21,10 @@ fn matches_to_edit_at_offset( ) -> TextEdit { let mut edit_builder = ra_text_edit::TextEditBuilder::default(); for m in &matches.matches { - edit_builder - .replace(m.range.checked_sub(relative_start).unwrap(), render_replace(m, file_src)); + edit_builder.replace( + m.range.range.checked_sub(relative_start).unwrap(), + render_replace(m, file_src), + ); } edit_builder.finish() } -- cgit v1.2.3