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 Irwin 2025-02-14 11:18:07 -07:00 committed by GitHub
parent 7ee492746d
commit 20460239a0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 19 additions and 24 deletions

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 }
}
}