void (Graphics g) { final SelectionModel model = getSelectionModel(); if (!model.hasBlockSelection()) return; final Point start = logicalPositionToXY(model.getBlockStart()); final Point end = logicalPositionToXY(model.getBlockEnd()); g.setColor(myScheme.getColor(EditorColors.SELECTION_BACKGROUND_COLOR)); final int y; final int height; if (start.y <= end.y) { y = start.y; height = end.y - y + getLineHeight(); } else { y = end.y; height = start.y - end.y + getLineHeight(); } final int x = Math.min(start.x, end.x); final int width = Math.max(2, Math.abs(end.x - start.x)); g.fillRect(x, y, width, height); }