aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--helix-term/src/commands.rs4
-rw-r--r--helix-view/src/lib.rs6
2 files changed, 8 insertions, 2 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index fa1fa4e4..e2c4a9d9 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -3385,7 +3385,7 @@ fn buffer_picker(cx: &mut Context) {
.map(helix_core::path::get_relative_path);
let path = match path.as_deref().and_then(Path::to_str) {
Some(path) => path,
- None => return Cow::Borrowed(SCRATCH_BUFFER_NAME),
+ None => SCRATCH_BUFFER_NAME,
};
let mut flags = Vec::new();
@@ -3401,7 +3401,7 @@ fn buffer_picker(cx: &mut Context) {
} else {
format!(" ({})", flags.join(""))
};
- Cow::Owned(format!("{}{}", path, flag))
+ Cow::Owned(format!("{} {}{}", self.id, path, flag))
}
}
diff --git a/helix-view/src/lib.rs b/helix-view/src/lib.rs
index a56c914d..e0964e1c 100644
--- a/helix-view/src/lib.rs
+++ b/helix-view/src/lib.rs
@@ -26,6 +26,12 @@ impl Default for DocumentId {
}
}
+impl std::fmt::Display for DocumentId {
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+ f.write_fmt(format_args!("{}", self.0))
+ }
+}
+
slotmap::new_key_type! {
pub struct ViewId;
}