src/vs/editor/contrib/linesOperations/browser/linesOperations.ts/DeleteAllRightAction/_getRangesToDelete
class DeleteAllRightAction:	_getRangesToDelete(editor: IActiveCodeEditor): Range[] {
		let model = editor.getModel();
		if (model === null) {
			return [];
		}

		let selections = editor.getSelections();

		if (selections === null) {
			return [];
		}

		let rangesToDelete: Range[] = selections.map((sel) => {
			if (sel.isEmpty()) {
				const maxColumn = model.getLineMaxColumn(sel.startLineNumber);

				if (sel.startColumn === maxColumn) {
					return new Range(sel.startLineNumber, sel.startColumn, sel.startLineNumber + 1, 1);
				} else {
					return new Range(sel.startLineNumber, sel.startColumn, sel.startLineNumber, maxColumn);
				}
			}
			return sel;
		});

		rangesToDelete.sort(Range.compareRangesUsingStarts);
		return rangesToDelete;
	}