mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PlainEnterProcessor: redundant 'if' removed
GitOrigin-RevId: f6364327e7f63c07cbea8653948fbe197f466624
This commit is contained in:
committed by
intellij-monorepo-bot
parent
dba1069279
commit
42b6965a5d
+1
-10
@@ -192,16 +192,7 @@ public class PlainEnterProcessor implements EnterProcessor {
|
||||
EditorActionManager actionManager = EditorActionManager.getInstance();
|
||||
EditorActionHandler actionHandler = actionManager.getActionHandler(IdeActions.ACTION_EDITOR_MOVE_LINE_END);
|
||||
final DataContext dataContext = DataManager.getInstance().getDataContext(editor.getComponent());
|
||||
if (dataContext == null) {
|
||||
i = CharArrayUtil.shiftForwardUntil(whiteSpaceText, i, "\n");
|
||||
if (i >= whiteSpaceText.length()) {
|
||||
i = whiteSpaceText.length();
|
||||
}
|
||||
editor.getCaretModel().moveToOffset(i + textRange.getStartOffset());
|
||||
}
|
||||
else {
|
||||
actionHandler.execute(editor, editor.getCaretModel().getCurrentCaret(), dataContext);
|
||||
}
|
||||
actionHandler.execute(editor, editor.getCaretModel().getCurrentCaret(), dataContext);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user