Johannes Rieken
2023-06-02 17:13:24 +02:00
committed by GitHub
parent 6d45c3610a
commit 3062c19c90
2 changed files with 5 additions and 16 deletions

View File

@@ -18,7 +18,6 @@ export class Navigation {
this._disposables.push(
vscode.commands.registerCommand('references-view.next', () => this.next(false)),
vscode.commands.registerCommand('references-view.prev', () => this.previous(false)),
_view.onDidChangeSelection(() => this._ensureSelectedElementIsVisible()),
);
}
@@ -31,20 +30,6 @@ export class Navigation {
this._ctxCanNavigate.set(Boolean(this._delegate));
}
private _ensureSelectedElementIsVisible(): void {
if (this._view.selection.length === 0) {
return;
}
const [item] = this._view.selection;
const location = this._delegate?.location(item);
if (!location) {
return;
}
if (vscode.window.activeTextEditor?.document.uri.toString() !== location.uri.toString()) {
this._open(location, true);
}
}
private _anchor(): undefined | unknown {
if (!this._delegate) {
return undefined;