ZIm/crates/language/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
..
syntax_map Add a test demonstrating ERB language loading bug (#32278) 2025-06-11 04:03:42 +00:00
buffer.rs Fix race condition between auto-indent and on-type-formatting (#32005) 2025-06-23 17:59:06 -04:00
buffer_tests.rs Add #[track_caller] to test utilities that involve marked text (#32043) 2025-06-04 02:37:27 +00:00
diagnostic_set.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
highlight_map.rs Docs for indent_size_for_line and co 2024-01-09 20:50:34 +01:00
language.rs editor: Utilize filter_text from language server for filter_range (#33155) 2025-06-21 19:47:16 +05:30
language_registry.rs Move r-a status into the activity indicator (#32726) 2025-06-13 22:33:02 +00:00
language_settings.rs copilot: Allow enterprise to sign in and use copilot (#32296) 2025-06-17 11:36:53 +02:00
manifest.rs python: Re-land usage of source file path in toolchain picker (#31893) 2025-06-02 16:29:06 +00:00
outline.rs editor: Improve code completion filtering to provide fewer and more accurate suggestions (#32928) 2025-06-18 16:01:28 +05:30
proto.rs Show inline previews for LSP document colors (#32816) 2025-06-17 13:46:21 +00:00
syntax_map.rs Diff view (#32922) 2025-06-18 14:43:23 +00:00
task_context.rs Add initial package.json scripts task autodetection (#32497) 2025-06-10 22:16:27 +00:00
text_diff.rs agent: Improve Gemini support in the edit_file tool (#31116) 2025-05-22 12:01:43 +03:00
toolchain.rs python: Re-land usage of source file path in toolchain picker (#31893) 2025-06-02 16:29:06 +00:00