提交 fa7d5e7d 编写于 作者: J Johannes Rieken

fix `breadcrumbs.symbolPath` setting

上级 830a7589
......@@ -103,12 +103,12 @@ export class BreadcrumbsModel {
return result;
}
let didAddOutlineElement = false;
for (let element of this._currentOutline.value.config.breadcrumbsDataSource.getBreadcrumbElements()) {
result.push(new OutlineElement2(element, this._currentOutline.value));
didAddOutlineElement = true;
const breadcrumbsElements = this._currentOutline.value.config.breadcrumbsDataSource.getBreadcrumbElements();
for (let i = this._cfgSymbolPath.getValue() === 'last' ? breadcrumbsElements.length - 1 : 0; i < breadcrumbsElements.length; i++) {
result.push(new OutlineElement2(breadcrumbsElements[i], this._currentOutline.value));
}
if (!didAddOutlineElement && !this._currentOutline.value.isEmpty) {
if (breadcrumbsElements.length === 0 && !this._currentOutline.value.isEmpty) {
result.push(new OutlineElement2(this._currentOutline.value, this._currentOutline.value));
}
......
......@@ -36,7 +36,7 @@ export interface IOutlineCreator<P extends IEditorPane, E> {
}
export interface IBreadcrumbsDataSource<E> {
getBreadcrumbElements(): Iterable<E>;
getBreadcrumbElements(): readonly E[];
}
export interface IOutlineComparator<E> {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册