LineIndentProvider: support catch and finally

Part of #KT-22211
This commit is contained in:
Dmitry Gridin
2020-06-05 13:23:18 +07:00
parent acc15e5fad
commit 7c99a6fef4
19 changed files with 165 additions and 67 deletions
-2
View File
@@ -2,5 +2,3 @@ fun a() = try {
// do smth
} catch (e: Exception)
<caret>
// WITHOUT_CUSTOM_LINE_INDENT_PROVIDER
-2
View File
@@ -1,5 +1,3 @@
fun a() = try {
// do smth
} catch (e: Exception)<caret>
// WITHOUT_CUSTOM_LINE_INDENT_PROVIDER
-2
View File
@@ -4,5 +4,3 @@ fun a() = try {
<caret>
}
// WITHOUT_CUSTOM_LINE_INDENT_PROVIDER
-2
View File
@@ -3,5 +3,3 @@ fun a() = try {
} catch (e: Exception) {<caret>
}
// WITHOUT_CUSTOM_LINE_INDENT_PROVIDER
-2
View File
@@ -4,5 +4,3 @@ fun a() = try {
<caret>(e: Exception) {
}
// WITHOUT_CUSTOM_LINE_INDENT_PROVIDER
-2
View File
@@ -3,5 +3,3 @@ fun a() = try {
} catch <caret>(e: Exception) {
}
// WITHOUT_CUSTOM_LINE_INDENT_PROVIDER
+20
View File
@@ -0,0 +1,20 @@
fun a() = try {
// do smth
} catch (e: Exception) {
} catch (e: Exception) {
} catch (e: Exception) {
} catch (e: Exception) {
} catch (e: Exception) {
} catch (e: Exception) {
} catch (e: Exception) {
} catch (e: Exception) {
} catch (e: Exception)
<caret>
+19
View File
@@ -0,0 +1,19 @@
fun a() = try {
// do smth
} catch (e: Exception) {
} catch (e: Exception) {
} catch (e: Exception) {
} catch (e: Exception) {
} catch (e: Exception) {
} catch (e: Exception) {
} catch (e: Exception) {
} catch (e: Exception) {
} catch (e: Exception)<caret>
-2
View File
@@ -4,5 +4,3 @@ fun a() = try {
<caret>{
}
// WITHOUT_CUSTOM_LINE_INDENT_PROVIDER
-2
View File
@@ -3,5 +3,3 @@ fun a() = try {
} finally<caret> {
}
// WITHOUT_CUSTOM_LINE_INDENT_PROVIDER
-2
View File
@@ -6,5 +6,3 @@ fun a() {
a
}
}
// WITHOUT_CUSTOM_LINE_INDENT_PROVIDER
-2
View File
@@ -5,5 +5,3 @@ fun a() {
a
}
}
// WITHOUT_CUSTOM_LINE_INDENT_PROVIDER
-2
View File
@@ -4,5 +4,3 @@ fun a() {
} finally
<caret>
}
// WITHOUT_CUSTOM_LINE_INDENT_PROVIDER
-2
View File
@@ -3,5 +3,3 @@ fun a() {
dos()
} finally<caret>
}
// WITHOUT_CUSTOM_LINE_INDENT_PROVIDER
+4
View File
@@ -0,0 +1,4 @@
fun a() = try {
// do smth
} finally
<caret>
+3
View File
@@ -0,0 +1,3 @@
fun a() = try {
// do smth
} finally<caret>