src/vs/editor/contrib/indentation/indentation.ts/ReindentSelectedLinesAction/run
class ReindentSelectedLinesAction:	public run(accessor: ServicesAccessor, editor: ICodeEditor): void {
		let model = editor.getModel();
		if (!model) {
			return;
		}

		let selections = editor.getSelections();
		if (selections === null) {
			return;
		}

		let edits: IIdentifiedSingleEditOperation[] = [];

		for (let selection of selections) {
			let startLineNumber = selection.startLineNumber;
			let endLineNumber = selection.endLineNumber;

			if (startLineNumber !== endLineNumber && selection.endColumn === 1) {
				endLineNumber--;
			}

			if (startLineNumber === 1) {
				if (startLineNumber === endLineNumber) {
					continue;
				}
			} else {
				startLineNumber--;
			}

			let editOperations = getReindentEditOperations(model, startLineNumber, endLineNumber);
			edits.push(...editOperations);
		}

		if (edits.length > 0) {
			editor.pushUndoStop();
			editor.executeEdits(this.id, edits);
			editor.pushUndoStop();
		}
	}