Extend Selection: don't select lambda parameters if lambda is multiple lines (#2586)
#KT-29364 Fixed
This commit is contained in:
committed by
GitHub
parent
232be94738
commit
46907f861a
@@ -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>
|
||||
}
|
||||
Reference in New Issue
Block a user