mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
IDEA-131953 Multiple carets misbehave when auto completion dropdown opens
This commit is contained in:
@@ -650,6 +650,47 @@ public interface Test {
|
||||
assert !lookup
|
||||
}
|
||||
|
||||
public void testMulticaretLeftRightMovements() {
|
||||
myFixture.configureByText("a.java", """
|
||||
class Foo {
|
||||
void foo(String iterable) {
|
||||
<caret>ter x
|
||||
<caret>ter x
|
||||
}
|
||||
}
|
||||
""")
|
||||
type('i')
|
||||
assert lookup
|
||||
|
||||
edt { myFixture.performEditorAction(IdeActions.ACTION_EDITOR_MOVE_CARET_RIGHT) }
|
||||
myFixture.checkResult """
|
||||
class Foo {
|
||||
void foo(String iterable) {
|
||||
it<caret>er x
|
||||
it<caret>er x
|
||||
}
|
||||
}
|
||||
"""
|
||||
joinAutopopup()
|
||||
joinCompletion()
|
||||
assert lookup
|
||||
assert !lookup.calculating
|
||||
|
||||
edt { myFixture.performEditorAction(IdeActions.ACTION_EDITOR_MOVE_CARET_LEFT) }
|
||||
myFixture.checkResult """
|
||||
class Foo {
|
||||
void foo(String iterable) {
|
||||
i<caret>ter x
|
||||
i<caret>ter x
|
||||
}
|
||||
}
|
||||
"""
|
||||
joinAutopopup()
|
||||
joinCompletion()
|
||||
assert lookup
|
||||
assert !lookup.calculating
|
||||
}
|
||||
|
||||
public void testTypingInAnotherEditor() {
|
||||
myFixture.configureByText("a.java", "")
|
||||
type 'c'
|
||||
|
||||
Reference in New Issue
Block a user