Extend Selection: don't select lambda parameters if lambda is multiple lines (#2586)

#KT-29364  Fixed
This commit is contained in:
Toshiaki Kameyama
2020-06-11 18:20:32 +09:00
committed by GitHub
parent 232be94738
commit 46907f861a
19 changed files with 141 additions and 0 deletions
@@ -0,0 +1,5 @@
fun foo(f: (Int) -> Int) {}
fun test() {
foo { it -> <caret>it + 1 }
}
@@ -0,0 +1,5 @@
fun foo(f: (Int) -> Int) {}
fun test() {
foo { it -> <caret><selection>it</selection> + 1 }
}
@@ -0,0 +1,5 @@
fun foo(f: (Int) -> Int) {}
fun test() {
foo { it -> <caret><selection>it + 1</selection> }
}
@@ -0,0 +1,5 @@
fun foo(f: (Int) -> Int) {}
fun test() {
foo { <selection>it -> <caret>it + 1</selection> }
}
@@ -0,0 +1,5 @@
fun foo(f: (Int) -> Int) {}
fun test() {
foo <selection>{ it -> <caret>it + 1 }</selection>
}
@@ -0,0 +1,9 @@
fun foo(f: (Int) -> Int) {}
fun test() {
foo { it ->
<caret>it + 1
it + 1
}
}
@@ -0,0 +1,9 @@
fun foo(f: (Int) -> Int) {}
fun test() {
foo { it ->
<caret><selection>it</selection> + 1
it + 1
}
}
@@ -0,0 +1,9 @@
fun foo(f: (Int) -> Int) {}
fun test() {
foo { it ->
<caret><selection>it + 1</selection>
it + 1
}
}
@@ -0,0 +1,9 @@
fun foo(f: (Int) -> Int) {}
fun test() {
foo { it ->
<selection> <caret>it + 1
</selection>
it + 1
}
}
@@ -0,0 +1,9 @@
fun foo(f: (Int) -> Int) {}
fun test() {
foo { it ->
<selection> <caret>it + 1
it + 1
</selection> }
}
@@ -0,0 +1,9 @@
fun foo(f: (Int) -> Int) {}
fun test() {
foo <selection>{ it ->
<caret>it + 1
it + 1
}</selection>
}
@@ -0,0 +1,9 @@
fun foo(f: (Int) -> Int) {}
fun test() {
foo { it ->
it + 1
<caret>it + 1
}
}
@@ -0,0 +1,9 @@
fun foo(f: (Int) -> Int) {}
fun test() {
foo { it ->
it + 1
<caret><selection>it</selection> + 1
}
}
@@ -0,0 +1,9 @@
fun foo(f: (Int) -> Int) {}
fun test() {
foo { it ->
it + 1
<caret><selection>it + 1</selection>
}
}
@@ -0,0 +1,9 @@
fun foo(f: (Int) -> Int) {}
fun test() {
foo { it ->
it + 1
<selection> <caret>it + 1
</selection> }
}
@@ -0,0 +1,9 @@
fun foo(f: (Int) -> Int) {}
fun test() {
foo { it ->
<selection> it + 1
<caret>it + 1
</selection> }
}
@@ -0,0 +1,9 @@
fun foo(f: (Int) -> Int) {}
fun test() {
foo <selection>{ it ->
it + 1
<caret>it + 1
}</selection>
}