ZIm/crates/collab/src
Cole Miller 7a34dd9888
Save buffers after restoring hunks in the project diff (#25620)
This PR fixes a bug where using the project diff editor to restore hunks
from a file that's not open in its own buffer would cause those reverts
to be lost once the project diff drops its excerpts for that file.

The fix is to save the buffers after restoring them but before the
excerpts are (potentially) dropped. This is done for the project diff
editor only. If we fail to save the affected files, we add their buffers
to the active workspace, so that the reverted contents are preserved and
the user can try again to save them.

- [x] Get it working
- [x] Test
- [ ] ~~Clean up boolean soup~~

Co-authored-by: Max <max@zed.dev>

Release Notes:

- N/A
2025-02-26 15:16:17 -05:00
..
api collab: Add the ability to filter extensions by what they provide (#24315) 2025-02-05 22:12:18 +00:00
bin windows: Make collab run on Windows (#23117) 2025-01-17 09:39:13 +02:00
db Revert "file_finder: Remove common segments of long paths in search results (#25049)" (#25163) 2025-02-19 15:32:29 +00:00
llm collab: Give Zed AI users access to Claude 3.7 Sonnet (#25576) 2025-02-25 12:12:09 -05:00
rpc Remove dev servers (#19638) 2024-10-24 12:14:03 -06:00
tests Save buffers after restoring hunks in the project diff (#25620) 2025-02-26 15:16:17 -05:00
api.rs collab: Remove POST /snowflake/events endpoint (#24817) 2025-02-13 14:31:57 -05:00
auth.rs Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
cents.rs Send llm events to snowflake too (#21091) 2024-11-22 20:40:39 -07:00
completion.rs Supermaven (#10788) 2024-05-03 12:50:42 -07:00
db.rs collab: Store features provided by extensions in the database (#24303) 2025-02-05 19:50:24 +00:00
env.rs collab: Add support for reading boolean values from .env.toml (#16317) 2024-08-15 17:07:17 -04:00
errors.rs Remove more unused code related to GitHub auth and errors 2022-04-21 08:57:49 -06:00
executor.rs Remove 2 suffix for collab, rope, settings, menu 2024-01-03 12:29:16 -08:00
lib.rs Rename livekit_server to livekit_api (#24984) 2025-02-16 20:24:12 +00:00
llm.rs collab: Adjust maximum spending limit check (#25596) 2025-02-25 16:45:01 -05:00
main.rs Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
migrations.rs collab: Remove unused parameter to run_database_migrations (#15883) 2024-08-06 17:31:52 -04:00
rate_limiter.rs Allow filling co-authors in the git panel's commit input (#23329) 2025-01-18 22:57:17 +02:00
rpc.rs Git push/pull/fetch (#25445) 2025-02-24 18:29:52 +00:00
seed.rs Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
stripe_billing.rs Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
tests.rs Fix some syncing issues with git statuses (#25535) 2025-02-25 22:09:02 -07:00
user_backfiller.rs Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00