ZIm/crates/language/src
Smit Barmase 69d7ea7b60
buffer: Fix broken auto indent when pasting code starting with new line (#28134)
Closes #26907

Currently, in case of new line to find delta, it is comparing old first
line indent with new second line indent. This results into incorrect
indentation. This PR fixes this delta calculation by passing correct
second line indent in that particular case.

- [X] Add Test

Before:


https://github.com/user-attachments/assets/065deba0-be19-4643-a784-d248a8e7c891

After:


https://github.com/user-attachments/assets/a0037043-4bd8-460f-b8ba-b7da7bdbe1ea

Release Notes:

- Fixed issue where pasting code starting with new line resulted
incorrect auto indent.
2025-04-05 05:14:15 +05:30
..
syntax_map chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
buffer.rs buffer: Fix broken auto indent when pasting code starting with new line (#28134) 2025-04-05 05:14:15 +05:30
buffer_tests.rs buffer: Fix broken auto indent when pasting code starting with new line (#28134) 2025-04-05 05:14:15 +05:30
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 chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
language_registry.rs chore: Bump Rust version to 1.86 (#28021) 2025-04-03 23:32:50 +02:00
language_settings.rs Add completions.lsp_insert_mode setting to control what ranges are replaced when a completion is inserted (#27453) 2025-04-02 16:55:03 -03:00
manifest.rs project: Track manifest locations per unique manifest locator (#27194) 2025-03-21 15:22:36 +01:00
outline.rs Fix panic when outline items have no name (#24574) 2025-02-10 18:50:26 +00:00
proto.rs Allow viewing past commits in Zed (#27636) 2025-03-31 23:26:47 +00:00
syntax_map.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
task_context.rs Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
text_diff.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
toolchain.rs toolchains: Add support for relative paths (#27777) 2025-03-31 19:48:09 +02:00