PY-10972 Recursively detect the alignment owner for the new block on enter

by properly implementing Block.isIncomplete() for collection literals,
comprehensions and parenthesized expressions instead of hand-written
search for the preceding expression lacking the closing bracket.
This commit is contained in:
Mikhail Golubev
2018-04-04 19:29:49 +03:00
parent 1145384502
commit dbf49edb14
8 changed files with 40 additions and 16 deletions
@@ -642,4 +642,19 @@ public class PyEditingTest extends PyTestCase {
public void testEnterInIncompleteParenthesizedGenerator() {
doTypingTest("\nfoo");
}
// PY-10972
public void testEnterInIncompleteNestedListLiteral() {
doTypingTest("\n'baz'");
}
// PY-10972
public void testEnterInIncompleteNestedTupleLiteral() {
doTypingTest("\n'baz'");
}
// PY-10972
public void testEnterInIncompleteNestedGluedStringInParentheses() {
doTypingTest("\n'baz'");
}
}