Flush output queue even when 'exiting' flag is set

There are legitimate instances when the queue should flush even though
Vim is exiting, e.g. to display a 'confirm quit' dialog with 'go+=c'.

This patch has the negative side-effect that the "dropping DO message"
warning may occur more frequently.  Another fix for this problem has to
be devised.
This commit is contained in:
Bjorn Winckler
2008-06-13 19:01:56 +02:00
parent 3b966f9e01
commit cd2f7e9eb1
+6 -4
View File
@@ -462,10 +462,9 @@ static NSString *MMSymlinkWarningString =
// NOTE! This method gets called a lot; if we were to flush every time it
// got called MacVim would feel unresponsive. So there is a time out which
// ensures that the queue isn't flushed too often.
if (exiting ||
(!force && lastFlushDate &&
-[lastFlushDate timeIntervalSinceNow] < MMFlushTimeoutInterval &&
[drawData length] < MMFlushQueueLenHint))
if (!force && lastFlushDate
&& -[lastFlushDate timeIntervalSinceNow] < MMFlushTimeoutInterval
&& [drawData length] < MMFlushQueueLenHint)
return;
if ([drawData length] > 0) {
@@ -1847,6 +1846,9 @@ static NSString *MMSymlinkWarningString =
- (void)queueMessage:(int)msgid data:(NSData *)data
{
//if (msgid != EnableMenuItemMsgID)
// NSLog(@"queueMessage:%s", MessageStrings[msgid]);
[outputQueue addObject:[NSData dataWithBytes:&msgid length:sizeof(int)]];
if (data)
[outputQueue addObject:data];