markdown: Don't adjust indentation when inserting with multiple cursors (#40794)

Closes #40757

## Summary

This PR addresses an issue where Zed incorrectly adjusts the indentation
of Markdown lists when inserting text using multiple cursors. Currently:

- Editing individual lines with a single cursor behaves correctly (no
unwanted indentation changes).
- Using multiple cursors, Zed automatically adjusts the indentation,
unlike VS Code, which preserves the existing formatting.

## Tasks
- [x] Implement a new test to verify correct Markdown indentation
behavior with multiple cursors.
- [x] Apply the fix to prevent Zed from adjusting indentation when
inserting text on multiple cursors.

------------------------

Release Notes:

- Fixed an issue where inserting text with multiple cursors inside a
nested Markdown list would cause it to lose its indentation.

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
This commit is contained in:
vipex
2025-12-05 00:18:06 +05:30
committed by GitHub
co-authored by Smit Barmase
parent d5ed9d3e3a
commit 9ae77ec3c9
5 changed files with 65 additions and 0 deletions
Generated
+1
View File
@@ -5405,6 +5405,7 @@ dependencies = [
"tree-sitter-bash",
"tree-sitter-c",
"tree-sitter-html",
"tree-sitter-md",
"tree-sitter-python",
"tree-sitter-rust",
"tree-sitter-typescript",