提交 53b74c12 编写于 作者: B Benjamin Pasero

shorten paths in main menu by looking for userHome

上级 c295af57
......@@ -468,6 +468,10 @@ export class VSCodeMenu {
}
private createOpenRecentMenuItem(path: string, actionId: string): Electron.MenuItem {
if ((platform.isMacintosh || platform.isLinux) && path.indexOf(this.environmentService.userHome) === 0) {
path = `~${path.substr(this.environmentService.userHome.length)}`;
}
return new MenuItem(this.likeAction(actionId, {
label: unMnemonicLabel(path), click: (menuItem, win, event) => {
const openInNewWindow = this.isOptionClick(event);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册