59
60
public static shiftIndent(line: string, column: number, tabSize: number, indentSize: number, insertSpaces: boolean): string {
61
>
// Determine the visible column where the content starts
shiftCommand.ts
62
>
const contentStartVisibleColumn = CursorColumns.visibleColumnFromColumn(line, column, tabSize);
63
>
64
>
if (insertSpaces) {
65
>
const indent = cachedStringRepeat(' ', indentSize);
66
>
const desiredTabStop = CursorColumns.nextIndentTabStop(contentStartVisibleColumn, indentSize);
67
>
const indentCount = desiredTabStop / indentSize; // will be an integer
68
>
return cachedStringRepeat(indent, indentCount);
69
>
} else {
70
const indent = '\t';
71
const desiredTabStop = CursorColumns.nextRenderTabStop(contentStartVisibleColumn, tabSize);