diff options
Diffstat (limited to 'crates/ra_ide_api/src/lib.rs')
-rw-r--r-- | crates/ra_ide_api/src/lib.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/crates/ra_ide_api/src/lib.rs b/crates/ra_ide_api/src/lib.rs index 9e76dabff..d4dba1eeb 100644 --- a/crates/ra_ide_api/src/lib.rs +++ b/crates/ra_ide_api/src/lib.rs | |||
@@ -279,7 +279,14 @@ impl Analysis { | |||
279 | /// stuff like trailing commas. | 279 | /// stuff like trailing commas. |
280 | pub fn join_lines(&self, frange: FileRange) -> SourceChange { | 280 | pub fn join_lines(&self, frange: FileRange) -> SourceChange { |
281 | let file = self.db.parse(frange.file_id); | 281 | let file = self.db.parse(frange.file_id); |
282 | SourceChange::from_local_edit(frange.file_id, join_lines::join_lines(&file, frange.range)) | 282 | let file_edit = |
283 | SourceFileEdit { file_id: frange.file_id, edit: join_lines::join_lines(&file, frange) }; | ||
284 | SourceChange { | ||
285 | label: "join lines".to_string(), | ||
286 | source_file_edits: vec![file_edit], | ||
287 | file_system_edits: vec![], | ||
288 | cursor_position: None, | ||
289 | } | ||
283 | } | 290 | } |
284 | 291 | ||
285 | /// Returns an edit which should be applied when opening a new line, fixing | 292 | /// Returns an edit which should be applied when opening a new line, fixing |