diff options
Diffstat (limited to 'crates/ra_ide/src/assists.rs')
-rw-r--r-- | crates/ra_ide/src/assists.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/ra_ide/src/assists.rs b/crates/ra_ide/src/assists.rs index 40d56a4f7..2b5d11681 100644 --- a/crates/ra_ide/src/assists.rs +++ b/crates/ra_ide/src/assists.rs | |||
@@ -37,6 +37,10 @@ fn action_to_edit( | |||
37 | file_id: FileId, | 37 | file_id: FileId, |
38 | assist_label: &AssistLabel, | 38 | assist_label: &AssistLabel, |
39 | ) -> SourceChange { | 39 | ) -> SourceChange { |
40 | let file_id = match action.file { | ||
41 | ra_assists::AssistFile::TargetFile(it) => it, | ||
42 | _ => file_id, | ||
43 | }; | ||
40 | let file_edit = SourceFileEdit { file_id, edit: action.edit }; | 44 | let file_edit = SourceFileEdit { file_id, edit: action.edit }; |
41 | SourceChange::source_file_edit(assist_label.label.clone(), file_edit) | 45 | SourceChange::source_file_edit(assist_label.label.clone(), file_edit) |
42 | .with_cursor_opt(action.cursor_position.map(|offset| FilePosition { offset, file_id })) | 46 | .with_cursor_opt(action.cursor_position.map(|offset| FilePosition { offset, file_id })) |