                     if let doc = self.document, let hpc = doc.heliumPanelController {
                         self.view.window?.representedURL = url
                         hpc.updateTitleBar(didChange: false)
-                        NSApp.addWindowsItem(self.view.window!, title: url.lastPathComponent, filename: false)
+                        NSApp.addWindowsItem(self.view.window!, title: doc.displayName, filename: false)
                     }
                 }
             }

        item = NSMenuItem(title: "Paste", action: #selector(MyWebView.paste(_:)), keyEquivalent: "")
        menu.addItem(item)
        menu.addItem(NSMenuItem.separator())

        item = NSMenuItem(title: "New Window", action: #selector(appDelegate.newDocument(_:)), keyEquivalent: "")
        item.target = appDelegate

            
        case "title":
            title = mwv.title
            self.view.window?.windowController?.synchronizeWindowTitleWithDocumentName()
            break;
            
        default:
