提交 8ce940f3 编写于 作者: B Brandon Bloom 提交者: Benjamin Pasero

Fixes #36544. (#36578)

上级 bd7334b0
......@@ -572,15 +572,16 @@ export class HistoryService extends BaseHistoryService implements IHistoryServic
this.stack = this.stack.slice(0, this.index + 1);
}
this.setIndex(this.index + 1);
this.stack.splice(this.index, 0, entry);
this.stack.splice(this.index + 1, 0, entry);
// Check for limit
if (this.stack.length > HistoryService.MAX_STACK_ITEMS) {
this.stack.shift(); // remove first and dispose
if (this.index > 0) {
this.setIndex(this.index - 1);
if (this.lastIndex >= 0) {
this.lastIndex--;
}
} else {
this.setIndex(this.index + 1);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册