File tree Expand file tree Collapse file tree 2 files changed +5
-16
lines changed
extensions/references-view/src Expand file tree Collapse file tree 2 files changed +5
-16
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,11 @@ export class EditorHighlights<T> {
23
23
vscode . workspace . onDidChangeTextDocument ( e => this . _ignore . add ( e . document . uri . toString ( ) ) ) ,
24
24
vscode . window . onDidChangeActiveTextEditor ( ( ) => _view . visible && this . update ( ) ) ,
25
25
_view . onDidChangeVisibility ( e => e . visible ? this . _show ( ) : this . _hide ( ) ) ,
26
- _view . onDidChangeSelection ( ( ) => _view . visible && this . update ( ) )
26
+ _view . onDidChangeSelection ( ( ) => {
27
+ if ( _view . visible ) {
28
+ this . update ( ) ;
29
+ }
30
+ } )
27
31
) ;
28
32
this . _show ( ) ;
29
33
}
Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ export class Navigation {
18
18
this . _disposables . push (
19
19
vscode . commands . registerCommand ( 'references-view.next' , ( ) => this . next ( false ) ) ,
20
20
vscode . commands . registerCommand ( 'references-view.prev' , ( ) => this . previous ( false ) ) ,
21
- _view . onDidChangeSelection ( ( ) => this . _ensureSelectedElementIsVisible ( ) ) ,
22
21
) ;
23
22
}
24
23
@@ -31,20 +30,6 @@ export class Navigation {
31
30
this . _ctxCanNavigate . set ( Boolean ( this . _delegate ) ) ;
32
31
}
33
32
34
- private _ensureSelectedElementIsVisible ( ) : void {
35
- if ( this . _view . selection . length === 0 ) {
36
- return ;
37
- }
38
- const [ item ] = this . _view . selection ;
39
- const location = this . _delegate ?. location ( item ) ;
40
- if ( ! location ) {
41
- return ;
42
- }
43
- if ( vscode . window . activeTextEditor ?. document . uri . toString ( ) !== location . uri . toString ( ) ) {
44
- this . _open ( location , true ) ;
45
- }
46
- }
47
-
48
33
private _anchor ( ) : undefined | unknown {
49
34
if ( ! this . _delegate ) {
50
35
return undefined ;
You can’t perform that action at this time.
0 commit comments