Implement staging of partially-staged hunks (#25520)

Closes: #25475 

This PR makes it possible to stage uncommitted hunks that overlap but do
not coincide with an unstaged hunk.

Release Notes:

- Made it possible to stage hunks that are already partially staged

---------

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Max <max@zed.dev>
This commit is contained in:
Cole Miller 2025-02-24 23:13:13 -05:00 committed by GitHub
parent bcbb19e06e
commit 45146b6f30
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 432 additions and 179 deletions

View file

@ -2934,6 +2934,7 @@ impl ToOffset for Point {
}
impl ToOffset for usize {
#[track_caller]
fn to_offset(&self, snapshot: &BufferSnapshot) -> usize {
assert!(
*self <= snapshot.len(),