Fix Quickstart regression

Output from a Vim process may reach the frontend even if the process is
cached.  Thus when processing input queues in the frontend, also check
if the input came from a cached controller else it could be silently
ignored.
This commit is contained in:
Bjorn Winckler
2009-04-10 18:11:18 +02:00
parent 0413dcf3f1
commit ac96dc67ba
+17 -1
View File
@@ -2148,7 +2148,8 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
NSDictionary *queues = inputQueues;
inputQueues = [NSMutableDictionary new];
// Pass each input queue on to the vim controller with matching identifier.
// Pass each input queue on to the vim controller with matching
// identifier (and note that it could be cached).
NSEnumerator *e = [queues keyEnumerator];
NSNumber *key;
while ((key = [e nextObject])) {
@@ -2161,6 +2162,21 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
break;
}
}
if (i < count) continue;
count = [cachedVimControllers count];
for (i = 0; i < count; ++i) {
MMVimController *vc = [cachedVimControllers objectAtIndex:i];
if (ukey == [vc identifier]) {
[vc processInputQueue:[queues objectForKey:key]];
break;
}
}
if (i == count)
NSLog(@"[%s] WARNING: No Vim controller for identifier=%d",
_cmd, ukey);
}
[queues release];