Snapshot file instead of path when creating a buffer snapshot
This commit is contained in:
@@ -126,7 +126,7 @@ impl Debug for TransformBlock {
|
||||
Self::Custom(block) => f.debug_struct("Custom").field("block", block).finish(),
|
||||
Self::ExcerptHeader { buffer, .. } => f
|
||||
.debug_struct("ExcerptHeader")
|
||||
.field("path", &buffer.path())
|
||||
.field("path", &buffer.file().map(|f| f.path()))
|
||||
.finish(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -838,7 +838,8 @@ impl EditorElement {
|
||||
|
||||
let mut filename = None;
|
||||
let mut parent_path = None;
|
||||
if let Some(path) = buffer.path() {
|
||||
if let Some(file) = buffer.file() {
|
||||
let path = file.path();
|
||||
filename =
|
||||
path.file_name().map(|f| f.to_string_lossy().to_string());
|
||||
parent_path =
|
||||
|
||||
Reference in New Issue
Block a user