src/vs/editor/contrib/comment/lineCommentCommand.ts/LineCommentCommand/getEditOperations
class LineCommentCommand:	public getEditOperations(model: ITextModel, builder: IEditOperationBuilder): void {

		let s = this._selection;
		this._moveEndPositionDown = false;

		if (s.startLineNumber === s.endLineNumber && this._ignoreFirstLine) {
			builder.addEditOperation(new Range(s.startLineNumber, model.getLineMaxColumn(s.startLineNumber), s.startLineNumber + 1, 1), s.startLineNumber === model.getLineCount() ? '' : '\n');
			this._selectionId = builder.trackSelection(s);
			return;
		}

		if (s.startLineNumber < s.endLineNumber && s.endColumn === 1) {
			this._moveEndPositionDown = true;
			s = s.setEndPosition(s.endLineNumber - 1, model.getLineMaxColumn(s.endLineNumber - 1));
		}

		const data = LineCommentCommand._gatherPreflightData(
			this._type,
			this._insertSpace,
			model,
			s.startLineNumber,
			s.endLineNumber,
			this._ignoreEmptyLines,
			this._ignoreFirstLine
		);

		if (data.supported) {
			return this._executeLineComments(model, builder, data, s);
		}

		return this._executeBlockComment(model, builder, s);
	}