ZIm/crates/language
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
..
src buffer: Fix broken auto indent when pasting code starting with new line (#28134) 2025-04-05 05:14:15 +05:30
build.rs Fix context line handline in project diagnostic view 2021-12-21 11:46:47 -08:00
Cargo.toml Add workspace-hack (#27277) 2025-04-02 13:26:34 -07:00
LICENSE-GPL chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00