int (@NotNull Editor editor) { int moveOffset = Math.min(offset, editor.getDocument().getTextLength()); if (ConsoleBuffer.useCycleBuffer() && moveOffset >= editor.getDocument().getTextLength()) { moveOffset = 0; } return moveOffset; }