VisualPosition (@NotNull VisualPosition pos) { int prevColumn = pos.column - 1; if (prevColumn >= 0) { return new VisualPosition(pos.line, prevColumn, true); } if (isColumnMode() || pos.line == 0) { return new VisualPosition(pos.line, 0, true); } int prevLine = pos.line - 1; return new VisualPosition(prevLine, EditorUtil.getLastVisualLineColumnNumber(this, prevLine), true); }