提交 741323bb 编写于 作者: J Johannes Rieken

fix #81323

上级 38d52c3e
......@@ -249,8 +249,6 @@ export class OutlinePanel extends ViewletPanel {
private _treeComparator!: OutlineItemComparator;
private _treeStates = new LRUCache<string, IDataTreeViewState>(10);
private _treeFakeUIEvent = new UIEvent('me');
private readonly _contextKeyFocused: IContextKey<boolean>;
private readonly _contextKeyFiltered: IContextKey<boolean>;
......@@ -531,10 +529,8 @@ export class OutlinePanel extends ViewletPanel {
// feature: reveal outline selection in editor
// on change -> reveal/select defining range
this._editorDisposables.add(this._tree.onDidChangeSelection(e => {
if (e.browserEvent === this._treeFakeUIEvent /* || e.payload && e.payload.didClickOnTwistie */) {
return;
}
this._editorDisposables.add(this._tree.onDidOpen(e => {
let [first] = e.elements;
if (!(first instanceof OutlineElement)) {
return;
......@@ -636,7 +632,7 @@ export class OutlinePanel extends ViewletPanel {
if (top === null) {
this._tree.reveal(item, 0.5);
}
this._tree.setFocus([item], this._treeFakeUIEvent);
this._tree.setSelection([item], this._treeFakeUIEvent);
this._tree.setFocus([item]);
this._tree.setSelection([item]);
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册