Dimension () { Dimension draft = getSizeWithoutCaret(); int caretX = visualPositionToXY(getCaretModel().getVisualPosition()).x; draft.width = Math.max(caretX, draft.width) + mySettings.getAdditionalColumnsCount() * getSpaceWidth(Font.PLAIN); return draft; }