Merge from vscode e558dc6ea73a75bd69d7a0b485f0e7e4194c66bf (#6864)

This commit is contained in:
Anthony Dresser
2019-08-21 20:44:59 -07:00
committed by GitHub
parent d2ae0f0154
commit 985bfae8a0
107 changed files with 2260 additions and 814 deletions

View File

@@ -1319,6 +1319,14 @@ export abstract class AbstractTree<T, TFilterData, TRef> implements IDisposable
this.view.scrollTop = scrollTop;
}
get scrollLeft(): number {
return this.view.scrollTop;
}
set scrollLeft(scrollLeft: number) {
this.view.scrollLeft = scrollLeft;
}
get scrollHeight(): number {
return this.view.scrollHeight;
}

View File

@@ -400,6 +400,14 @@ export class AsyncDataTree<TInput, T, TFilterData = void> implements IDisposable
this.tree.scrollTop = scrollTop;
}
get scrollLeft(): number {
return this.tree.scrollLeft;
}
set scrollLeft(scrollLeft: number) {
this.tree.scrollLeft = scrollLeft;
}
get scrollHeight(): number {
return this.tree.scrollHeight;
}

View File

@@ -219,7 +219,7 @@ export class IndexTreeModel<T extends Exclude<any, undefined>, TFilterData = voi
const result = this._setListNodeCollapsed(node, listIndex, revealed, collapsed!, recursive || false);
if (this.autoExpandSingleChildren && !collapsed! && !recursive) {
if (node !== this.root && this.autoExpandSingleChildren && !collapsed! && !recursive) {
let onlyVisibleChildIndex = -1;
for (let i = 0; i < node.children.length; i++) {