diff --git a/src/MacVim/MMWindowController.m b/src/MacVim/MMWindowController.m index 3749061113..c7a86e79df 100644 --- a/src/MacVim/MMWindowController.m +++ b/src/MacVim/MMWindowController.m @@ -313,8 +313,15 @@ - (void)setDocumentFilename:(NSString *)filename { - if (filename) - [decoratedWindow setRepresentedFilename:filename]; + if (!filename) + return; + + // Ensure file really exists or the path to the proxy icon will look weird. + // If the file does not exists, don't show a proxy icon. + if (![[NSFileManager defaultManager] fileExistsAtPath:filename]) + filename = @""; + + [decoratedWindow setRepresentedFilename:filename]; } - (void)setToolbar:(NSToolbar *)toolbar