Fix scroll to top on multibuffer save (#24885)

Co-Authored-By: Cole <cole@zed.dev>

Closes #ISSUE

Release Notes:

- N/A

---------

Co-authored-by: Cole <cole@zed.dev>
This commit is contained in:
Conrad IrwinandCole authored and GitHub committed 2025-02-14 13:18:07 -05:00
1 parent 8ef11c8cf9
commit 81bbabfa5b
3 files changed
+19 -24

No files matched your search

+6 -3
View File
@@ -149,11 +149,14 @@ impl MultiBufferDiffHunk {
}
#[derive(PartialEq, Eq, Ord, PartialOrd, Clone, Hash, Debug)]
pub struct PathKey(String);
pub struct PathKey {
namespace: &'static str,
path: Arc<Path>,
}
impl PathKey {
pub fn namespaced(namespace: &str, path: &Path) -> Self {
Self(format!("{}/{}", namespace, path.to_string_lossy()))
pub fn namespaced(namespace: &'static str, path: Arc<Path>) -> Self {
Self { namespace, path }
}
}