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
This commit is contained in:
Bjorn Winckler
2007-08-08 09:07:30 +00:00
parent c659ac0f36
commit ff164a8637
+3 -1
View File
@@ -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;