languages: Fix detents case line after typing :
in Python (#34017)
Closes #34002 `decrease_indent_patterns` should only contain mapping which are at same indent level with each other, which is not true for `match` and `case` mapping. Caused in https://github.com/zed-industries/zed/pull/33370 Release Notes: - N/A
This commit is contained in:
parent
8cc3b094d2
commit
38febed02d
3 changed files with 14 additions and 2 deletions
|
@ -22348,6 +22348,19 @@ async fn test_outdent_after_input_for_python(cx: &mut TestAppContext) {
|
|||
def f() -> list[str]:
|
||||
aˇ
|
||||
"});
|
||||
|
||||
// test does not outdent on typing : after case keyword
|
||||
cx.set_state(indoc! {"
|
||||
match 1:
|
||||
caseˇ
|
||||
"});
|
||||
cx.update_editor(|editor, window, cx| {
|
||||
editor.handle_input(":", window, cx);
|
||||
});
|
||||
cx.assert_editor_state(indoc! {"
|
||||
match 1:
|
||||
case:ˇ
|
||||
"});
|
||||
}
|
||||
|
||||
#[gpui::test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue