IDEA-88106 Auto-completion works incorrectly when I make and then fix a mistake

This commit is contained in:
peter
2012-07-02 13:15:17 +02:00
parent 5cec1d3638
commit 5a5cb78e31
12 changed files with 61 additions and 29 deletions
@@ -1272,4 +1272,22 @@ class Foo {
myFixture.checkResult 'class Foo {{ boolean <caret> }}'
}
@Override
protected void tearDown() {
CodeInsightSettings.instance.COMPLETION_CASE_SENSITIVE = CodeInsightSettings.FIRST_LETTER
super.tearDown()
}
public void testBackspaceShouldShowPreviousVariants() {
CodeInsightSettings.instance.COMPLETION_CASE_SENSITIVE = CodeInsightSettings.NONE
myFixture.addClass("class OuterX { static class TrueLine {} }")
myFixture.configureByText 'a.java', 'class Foo{ void foo(int truex) { return tr<caret> }}'
type 'ue'
assert myFixture.lookupElementStrings == ['true', 'truex']
type 'l'
assert myFixture.lookupElementStrings == ['TrueLine']
type '\b'
assert myFixture.lookupElementStrings == ['true', 'truex']
}
}