diff options
Diffstat (limited to 'helix-view')
-rw-r--r-- | helix-view/Cargo.toml | 1 | ||||
-rw-r--r-- | helix-view/src/document.rs | 6 | ||||
-rw-r--r-- | helix-view/src/editor.rs | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/helix-view/Cargo.toml b/helix-view/Cargo.toml index db53b54c..0dc18b37 100644 --- a/helix-view/Cargo.toml +++ b/helix-view/Cargo.toml @@ -15,6 +15,7 @@ default = [] term = ["crossterm"] [dependencies] +helix-stdx = { path = "../helix-stdx" } helix-core = { path = "../helix-core" } helix-event = { path = "../helix-event" } helix-loader = { path = "../helix-loader" } diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs index 0de0cd17..6473c2d1 100644 --- a/helix-view/src/document.rs +++ b/helix-view/src/document.rs @@ -855,7 +855,7 @@ impl Document { let text = self.text().clone(); let path = match path { - Some(path) => helix_core::path::get_canonicalized_path(&path), + Some(path) => helix_stdx::path::canonicalize(path), None => { if self.path.is_none() { bail!("Can't save with no path set!"); @@ -1049,7 +1049,7 @@ impl Document { } pub fn set_path(&mut self, path: Option<&Path>) { - let path = path.map(helix_core::path::get_canonicalized_path); + let path = path.map(helix_stdx::path::canonicalize); // if parent doesn't exist we still want to open the document // and error out when document is saved @@ -1672,7 +1672,7 @@ impl Document { pub fn relative_path(&self) -> Option<PathBuf> { self.path .as_deref() - .map(helix_core::path::get_relative_path) + .map(helix_stdx::path::get_relative_path) } pub fn display_name(&self) -> Cow<'static, str> { diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs index f13df213..0ab4be8b 100644 --- a/helix-view/src/editor.rs +++ b/helix-view/src/editor.rs @@ -1464,7 +1464,7 @@ impl Editor { // ??? possible use for integration tests pub fn open(&mut self, path: &Path, action: Action) -> Result<DocumentId, Error> { - let path = helix_core::path::get_canonicalized_path(path); + let path = helix_stdx::path::canonicalize(path); let id = self.document_by_path(&path).map(|doc| doc.id); let id = if let Some(id) = id { |