From 3b98d9f0dc67370f400cddecbecc618a432a522d Mon Sep 17 00:00:00 2001 From: Bjorn Winckler Date: Thu, 31 Jan 2008 16:24:45 +0100 Subject: [PATCH] Decrease false positives on untitled window detection The detection algorithm is still dumb; it now thinks a window is untitled (i.e. good for opening new files in) when its title begins with "[No Name] - VIM". This means that it now rejects modified buffers which haven't been saved to a file. --- src/MacVim/MMAppController.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MacVim/MMAppController.m b/src/MacVim/MMAppController.m index 7b26619214..b8ce17902b 100644 --- a/src/MacVim/MMAppController.m +++ b/src/MacVim/MMAppController.m @@ -967,7 +967,7 @@ typedef struct // TODO: This is a moronic test...should query the Vim process if there // are any open buffers or something like that instead. NSString *title = [[[vc windowController] window] title]; - if ([title hasPrefix:@"[No Name]"]) { + if ([title hasPrefix:@"[No Name] - VIM"]) { //NSLog(@"found untitled window"); return vc; }