diff options
Diffstat (limited to 'helix-view/src')
-rw-r--r-- | helix-view/src/editor.rs | 4 | ||||
-rw-r--r-- | helix-view/src/handlers/dap.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs index e8603221..8ef4413e 100644 --- a/helix-view/src/editor.rs +++ b/helix-view/src/editor.rs @@ -779,8 +779,8 @@ impl Editor { } // ??? possible use for integration tests - pub fn open(&mut self, path: PathBuf, action: Action) -> Result<DocumentId, Error> { - let path = helix_core::path::get_canonicalized_path(&path)?; + pub fn open(&mut self, path: &Path, action: Action) -> Result<DocumentId, Error> { + let path = helix_core::path::get_canonicalized_path(path)?; let id = self.document_by_path(&path).map(|doc| doc.id); let id = if let Some(id) = id { diff --git a/helix-view/src/handlers/dap.rs b/helix-view/src/handlers/dap.rs index b17ca353..ae1ae64c 100644 --- a/helix-view/src/handlers/dap.rs +++ b/helix-view/src/handlers/dap.rs @@ -62,7 +62,7 @@ pub fn jump_to_stack_frame(editor: &mut Editor, frame: &helix_dap::StackFrame) { return; }; - if let Err(e) = editor.open(path, Action::Replace) { + if let Err(e) = editor.open(&path, Action::Replace) { editor.set_error(format!("Unable to jump to stack frame: {}", e)); return; } |