mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-06 06:21:16 +07:00
undo of a completion finished by enter/tab/smart-enter behaves first as if that action was just performed without any completion
This commit is contained in:
@@ -851,6 +851,28 @@ class LiveComplete {
|
||||
assert myFixture.editor.document.text.contains('ArrStoExce.')
|
||||
}
|
||||
|
||||
public void testEnterSelectionUndo() {
|
||||
myFixture.configureByText "a.java", "class Foo {{ <caret> }}"
|
||||
def editor = openEditorForUndo();
|
||||
type('ArrStoExce\n')
|
||||
|
||||
edt { UndoManager.getInstance(project).undo(editor) }
|
||||
assert myFixture.editor.document.text.contains('ArrStoExce\n')
|
||||
}
|
||||
|
||||
public void testTabSelectionUndo() {
|
||||
myFixture.configureByText "a.java", "class Foo {{ <caret>x }}"
|
||||
def editor = openEditorForUndo();
|
||||
type('ArrStoExce\t')
|
||||
myFixture.checkResult("class Foo {{ ArrayStoreException<caret> }}")
|
||||
|
||||
edt { UndoManager.getInstance(project).undo(editor) }
|
||||
assert myFixture.editor.document.text.contains('ArrStoExce x')
|
||||
|
||||
edt { UndoManager.getInstance(project).undo(editor) }
|
||||
myFixture.checkResult("class Foo {{ ArrStoExce<caret>x }}")
|
||||
}
|
||||
|
||||
public void testAutopopupTypingUndo() {
|
||||
myFixture.configureByText "a.java", "class Foo {{ <caret> }}"
|
||||
def editor = openEditorForUndo();
|
||||
|
||||
Reference in New Issue
Block a user