ZIm/crates/project/src
Maxim 36eebb7ba8
Fix race condition between auto-indent and on-type-formatting (#32005)
This PR addresses to fix (#31308) a race condition where auto-indent (in
buffer.cs) and on-type-formatting (in lsp_store.rs) concurrently
calculate indentation using the same buffer snapshot.

Previous Solution (Abandoned): 
https://github.com/zed-industries/zed/pull/31340

Final Solution:
Delay applying on-type-formatting until auto-indent is complete.

Issue:

If AutoindentMode finishes first, formatting works correctly. If
"Formatting on typing" starts before AutoindentMode completes, it
results in double indentation.

Closes #31308

Release Notes:

- Fixed a race condition resulting in incorrect buffer contents when combining auto-indent and on-type-formatting
2025-06-23 17:59:06 -04:00
..
context_server_store context_store: Refactor state management (#29910) 2025-05-05 21:36:12 +02:00
debugger debugger: Kill debug sessions on app quit (#33273) 2025-06-23 20:41:53 +00:00
git_store chore: Fix warnings for Rust 1.89 (#32378) 2025-06-09 13:11:57 +02:00
lsp_command Remove language::markdown (#25136) 2025-02-19 08:55:36 -07:00
lsp_store Fix pull diagnostics on the remote clients (#33028) 2025-06-19 12:48:03 +00:00
manifest_tree python: Re-land usage of source file path in toolchain picker (#31893) 2025-06-02 16:29:06 +00:00
buffer_store.rs Fix release notes appearing in project search (#32898) 2025-06-17 20:56:41 +00:00
color_extractor.rs Simplify static expression to a constant (#23193) 2025-01-15 19:31:21 +00:00
connection_manager.rs Finish removing git repository state and scanning logic from worktrees (#27568) 2025-04-01 17:41:20 -04:00
context_server_store.rs agent: Store if context server should be enabled/disabled in the settings (#32994) 2025-06-21 14:46:36 +02:00
debounced_delay.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
debugger.rs debugger: More tidy up for SSH (#28993) 2025-04-21 16:00:03 +00:00
direnv.rs Fix parsing of direnv export json to support unset of environment variables + better logging (#32559) 2025-06-11 17:57:30 +00:00
environment.rs Fix parsing of direnv export json to support unset of environment variables + better logging (#32559) 2025-06-11 17:57:30 +00:00
git_store.rs Fix diff indicators not restored when reopening remote project (#31384) 2025-06-17 10:07:51 -04:00
image_store.rs zlog: Replace usages of env_logger in tests with zlog (#31436) 2025-05-26 11:48:50 -04:00
lsp_command.rs Fix pull diagnostics on the remote clients (#33028) 2025-06-19 12:48:03 +00:00
lsp_store.rs Fix race condition between auto-indent and on-type-formatting (#32005) 2025-06-23 17:59:06 -04:00
manifest_tree.rs python: Re-land usage of source file path in toolchain picker (#31893) 2025-06-02 16:29:06 +00:00
prettier_store.rs Use read-only access methods for read-only entity operations (#31479) 2025-05-26 23:04:31 -04:00
project.rs editor: Utilize filter_text from language server for filter_range (#33155) 2025-06-21 19:47:16 +05:30
project_settings.rs debugger: Support passing custom arguments to debug adapters (#33251) 2025-06-23 17:06:48 +00:00
project_tests.rs Fix release notes appearing in project search (#32898) 2025-06-17 20:56:41 +00:00
search.rs Reduce allocations (#31223) 2025-05-23 14:25:17 +03:00
search_history.rs project: Use VecDeque in SearchHistory (#31224) 2025-05-23 14:25:40 +03:00
task_inventory.rs debugger: Mark DapLocator::create_scenario as an async function (#32680) 2025-06-13 13:19:03 +02:00
task_store.rs Add initial package.json scripts task autodetection (#32497) 2025-06-10 22:16:27 +00:00
terminals.rs terminal: Match trait bounds with terminal input (#31441) 2025-06-02 21:12:28 -06:00
toolchain_store.rs debugger: Fix running JS tests when worktree root and package root do not coincide (#32644) 2025-06-13 05:03:07 +00:00
worktree_store.rs Improve TypeScript task detection (#31711) 2025-05-29 20:51:20 +00:00
yarn.rs Use read-only access methods for read-only entity operations (#31479) 2025-05-26 23:04:31 -04:00