Skip to content

Commit

Permalink
fix more issues
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero committed Jan 9, 2018
1 parent daeac8e commit 6ebd589
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/vs/editor/contrib/referenceSearch/referencesWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -659,10 +659,18 @@ export class ReferenceWidget extends PeekViewWidget {
this._onDidSelectReference.fire({ element, kind, source: 'tree' });
}
};
this._disposables.push(this._tree.onDidChangeFocus(event => onEvent(event.focus, 'show')));
this._disposables.push(this._tree.onDidChangeSelection(event => onEvent(event.selection[0], event && event.payload && event.payload.origin === 'keyboard' ? 'goto' : 'show')));
this._disposables.push(this._tree.onDidChangeFocus(event => {
if (event && event.payload && event.payload.origin === 'keyboard') {
onEvent(event.focus, 'show'); // only handle events from keyboard, mouse/touch is handled by other listeners below
}
}));
this._disposables.push(this._tree.onDidChangeSelection(event => {
if (event && event.payload && event.payload.origin === 'keyboard') {
onEvent(event.selection[0], 'goto'); // only handle events from keyboard, mouse/touch is handled by other listeners below
}
}));
this._disposables.push(controller.onDidFocus(element => onEvent(element, 'show')));
this._disposables.push(controller.onDidSelect(event => onEvent(event.focus, 'goto')));
this._disposables.push(controller.onDidSelect(element => onEvent(element, 'goto')));
this._disposables.push(controller.onDidOpenToSide(element => onEvent(element, 'side')));

this._treeContainer = div.hide();
Expand Down

0 comments on commit 6ebd589

Please sign in to comment.