mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
inline hostEditor
GitOrigin-RevId: 17e83d174304d76891ace83593e60a1055b56d31
This commit is contained in:
committed by
intellij-monorepo-bot
parent
7308e8b570
commit
c9d56af5c2
@@ -696,10 +696,9 @@ public class LookupImpl extends LightweightHint implements LookupEx, Disposable,
|
||||
int prefixLength) {
|
||||
String lookupString = LookupUtil.getCaseCorrectedLookupString(item, matcher, itemPattern);
|
||||
|
||||
final Editor hostEditor = editor;
|
||||
hostEditor.getCaretModel().runForEachCaret(__ -> {
|
||||
EditorModificationUtilEx.deleteSelectedText(hostEditor);
|
||||
final int caretOffset = hostEditor.getCaretModel().getOffset();
|
||||
editor.getCaretModel().runForEachCaret(__ -> {
|
||||
EditorModificationUtilEx.deleteSelectedText(editor);
|
||||
int caretOffset = editor.getCaretModel().getOffset();
|
||||
LookupElementInsertStopper element = item.as(LookupElementInsertStopper.class);
|
||||
if (element == null || !element.shouldStopLookupInsertion()) {
|
||||
int offset;
|
||||
@@ -713,9 +712,9 @@ public class LookupImpl extends LightweightHint implements LookupEx, Disposable,
|
||||
LOG.error("When completing " + item + " (" + classes + ")", ae);
|
||||
return;
|
||||
}
|
||||
hostEditor.getCaretModel().moveToOffset(offset);
|
||||
editor.getCaretModel().moveToOffset(offset);
|
||||
}
|
||||
hostEditor.getSelectionModel().removeSelection();
|
||||
editor.getSelectionModel().removeSelection();
|
||||
});
|
||||
|
||||
editor.getScrollingModel().scrollToCaret(ScrollType.RELATIVE);
|
||||
|
||||
Reference in New Issue
Block a user