mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-02 00:57:59 +07:00
always try to use injected document when handling typing, so that autocompletion popup is invoked in right editor
This commit is contained in:
+4
@@ -55,6 +55,10 @@ abstract class CompletionAutoPopupTestCase extends LightCodeInsightFixtureTestCa
|
||||
})
|
||||
}
|
||||
|
||||
protected void doHighlighting() {
|
||||
UIUtil.invokeAndWaitIfNeeded({ myFixture.doHighlighting() } as Runnable)
|
||||
}
|
||||
|
||||
void type(String s) {
|
||||
for (i in 0..<s.size()) {
|
||||
final c = s.charAt(i)
|
||||
|
||||
@@ -246,19 +246,6 @@ public class TypedHandler implements TypedActionHandler {
|
||||
}
|
||||
|
||||
static Editor injectedEditorIfCharTypedIsSignificant(final char charTyped, Editor editor, PsiFile oldFile) {
|
||||
boolean significant = charTyped == '"' ||
|
||||
charTyped == '\'' ||
|
||||
charTyped == '[' ||
|
||||
charTyped == '(' ||
|
||||
charTyped == ']' ||
|
||||
charTyped == ')' ||
|
||||
charTyped == '{' ||
|
||||
charTyped == '}' ||
|
||||
charTyped == '.';
|
||||
if (!significant) {
|
||||
return editor;
|
||||
}
|
||||
|
||||
int offset = editor.getCaretModel().getOffset();
|
||||
// even for uncommitted document try to retrieve injected fragment that has been there recently
|
||||
// we are assuming here that when user is (even furiously) typing, injected language would not change
|
||||
|
||||
Reference in New Issue
Block a user