提交 1525065f 编写于 作者: B Benjamin Pasero

OS X: why does 'Open Recent' menu show separator line? (fixes #4716)

上级 29c6d72b
......@@ -402,19 +402,24 @@ export class VSCodeMenu {
});
// Files
if (recentList.files.length > 0) {
let files = recentList.files;
if (platform.isMacintosh && recentList.files.length > 0) {
files = recentList.files.filter(f => recentList.folders.indexOf(f) < 0); // TODO@Ben migration (remove in the future)
}
if (files.length > 0) {
if (recentList.folders.length > 0) {
openRecentMenu.append(__separator__());
}
recentList.files.forEach((file, index) => {
files.forEach((file, index) => {
if (index < VSCodeMenu.MAX_RECENT_ENTRIES) {
openRecentMenu.append(this.createOpenRecentMenuItem(file));
}
});
}
if (recentList.folders.length || recentList.files.length) {
if (recentList.folders.length || files.length) {
openRecentMenu.append(__separator__());
openRecentMenu.append(new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miClearItems', comment: ['&& denotes a mnemonic'] }, "&&Clear Items")), click: () => this.clearOpenedPathsList() }));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册