diff --git a/src/textEditor.ts b/src/textEditor.ts index 8a4d79f5c0b..5cd990377d9 100644 --- a/src/textEditor.ts +++ b/src/textEditor.ts @@ -137,7 +137,7 @@ export class TextEditor { } static getLineMaxColumn(lineNumber: number): number { - if (lineNumber < 1 || lineNumber > TextEditor.getLineCount()) { + if (lineNumber < 0 || lineNumber > TextEditor.getLineCount()) { throw new Error('Illegal value ' + lineNumber + ' for `lineNumber`'); }