src/vs/editor/contrib/linesOperations/linesOperations.ts/DeleteLinesAction/run
class DeleteLinesAction:	public run(_accessor: ServicesAccessor, editor: ICodeEditor): void {
		if (!editor.hasModel()) {
			return;
		}

		let ops = this._getLinesToRemove(editor);

		let model: ITextModel = editor.getModel();
		if (model.getLineCount() === 1 && model.getLineMaxColumn(1) === 1) {
			// Model is empty
			return;
		}

		let linesDeleted = 0;
		let edits: IIdentifiedSingleEditOperation[] = [];
		let cursorState: Selection[] = [];
		for (let i = 0, len = ops.length; i < len; i++) {
			const op = ops[i];

			let startLineNumber = op.startLineNumber;
			let endLineNumber = op.endLineNumber;

			let startColumn = 1;
			let endColumn = model.getLineMaxColumn(endLineNumber);
			if (endLineNumber < model.getLineCount()) {
				endLineNumber += 1;
				endColumn = 1;
			} else if (startLineNumber > 1) {
				startLineNumber -= 1;
				startColumn = model.getLineMaxColumn(startLineNumber);
			}

			edits.push(EditOperation.replace(new Selection(startLineNumber, startColumn, endLineNumber, endColumn), ''));
			cursorState.push(new Selection(startLineNumber - linesDeleted, op.positionColumn, startLineNumber - linesDeleted, op.positionColumn));
			linesDeleted += (op.endLineNumber - op.startLineNumber + 1);
		}

		editor.pushUndoStop();
		editor.executeEdits(this.id, edits, cursorState);
		editor.pushUndoStop();
	}