提交 832f9409 编写于 作者: B Benjamin Pasero

fix #54052

上级 a56ec40e
......@@ -62,6 +62,7 @@ export class HistoryMainService implements IHistoryMainService {
const mru = this.getRecentlyOpened();
// Workspaces
if (Array.isArray(workspaces)) {
workspaces.forEach(workspace => {
const isUntitledWorkspace = !isSingleFolderWorkspaceIdentifier(workspace) && this.workspacesMainService.isUntitledWorkspace(workspace);
if (isUntitledWorkspace) {
......@@ -74,8 +75,10 @@ export class HistoryMainService implements IHistoryMainService {
// We do not add to recent documents here because on Windows we do this from a custom
// JumpList and on macOS we fill the recent documents in one go from all our data later.
});
}
// Files
if (Array.isArray(files)) {
files.forEach((path) => {
mru.files.unshift(path);
mru.files = arrays.distinct(mru.files, file => this.distinctFn(file));
......@@ -85,6 +88,7 @@ export class HistoryMainService implements IHistoryMainService {
app.addRecentDocument(path);
}
});
}
// Make sure its bounded
mru.workspaces = mru.workspaces.slice(0, HistoryMainService.MAX_TOTAL_RECENT_ENTRIES);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册