From ff164a8637ac2065ca57aec9730c61931f8fa327 Mon Sep 17 00:00:00 2001 From: Bjorn Winckler Date: Wed, 8 Aug 2007 09:07:30 +0000 Subject: [PATCH] If only one file is dropped, use ':drop' instead of ':tab drop' (this works better when a directory is dropped). git-svn-id: http://macvim.googlecode.com/svn/trunk@100 96c4425d-ca35-0410-94e5-3396d5c13a8f --- MMBackend.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MMBackend.m b/MMBackend.m index 54afef76b8..a58f43a925 100644 --- a/MMBackend.m +++ b/MMBackend.m @@ -1142,7 +1142,9 @@ static int specialKeyToNSKey(int key); // HACK! I'm not sure how to get Vim to open a list of files in tabs, // so instead I create a ':tab drop' command with all the files to open // and execute it. - NSMutableString *cmd = [NSMutableString stringWithString:@":tab drop"]; + NSMutableString *cmd = (n > 1) + ? [NSMutableString stringWithString:@":tab drop"] + : [NSMutableString stringWithString:@":drop"]; const void *end = [data bytes] + [data length]; int i;