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

		const model: ITextModel = editor.getModel();
		if (model.getLineCount() === 1 && model.getLineMaxColumn(1) === 1) {
			return;
		}

		const edits: ISingleEditOperation[] = [];
		const endCursorState: Selection[] = [];

		let linesDeleted = 0;

		for (const selection of editor.getSelections()) {
			const uniqueLines = new Set();
			const lines = [];

			for (let i = selection.startLineNumber; i <= selection.endLineNumber; i++) {
				const line = model.getLineContent(i);

				if (uniqueLines.has(line)) {
					continue;
				}

				lines.push(line);
				uniqueLines.add(line);
			}


			const selectionToReplace = new Selection(
				selection.startLineNumber,
				1,
				selection.endLineNumber,
				model.getLineMaxColumn(selection.endLineNumber)
			);

			const adjustedSelectionStart = selection.startLineNumber - linesDeleted;
			const finalSelection = new Selection(
				adjustedSelectionStart,
				1,
				adjustedSelectionStart + lines.length - 1,
				lines[lines.length - 1].length
			);

			edits.push(EditOperation.replace(selectionToReplace, lines.join('\n')));
			endCursorState.push(finalSelection);

			linesDeleted += (selection.endLineNumber - selection.startLineNumber + 1) - lines.length;
		}

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