src/vs/workbench/browser/parts/editor/textEditor.ts/AbstractTextEditor/getSelection
class AbstractTextEditor:	getSelection(): IEditorPaneSelection | undefined {
		const mainControl = this.getMainControl();
		if (mainControl) {
			const selection = mainControl.getSelection();
			if (selection) {
				return new TextEditorPaneSelection(selection);
			}
		}

		return undefined;
	}