diff --git a/src/MacVim/MMBackend.h b/src/MacVim/MMBackend.h index f0560263fb..df7d1b32db 100644 --- a/src/MacVim/MMBackend.h +++ b/src/MacVim/MMBackend.h @@ -31,7 +31,6 @@ unsigned specialColor; unsigned defaultBackgroundColor; unsigned defaultForegroundColor; - NSDate *lastFlushDate; id dialogReturn; NSTimer *blinkTimer; int blinkState; diff --git a/src/MacVim/MMBackend.m b/src/MacVim/MMBackend.m index 2847fdcf8a..1c21b12685 100644 --- a/src/MacVim/MMBackend.m +++ b/src/MacVim/MMBackend.m @@ -44,13 +44,6 @@ #define WIN_VER 2 // "-O" vertically split windows #define WIN_TABS 3 // "-p" windows on tab pages -// This constant controls how often the command queue may be flushed. If it is -// too small the app might feel unresponsive; if it is too large there might be -// long periods without the screen updating (e.g. when sourcing a large session -// file). (The unit is seconds.) -static float MMFlushTimeoutInterval = 0.1f; -static int MMFlushQueueLenHint = 80*40; - static unsigned MMServerMax = 1000; // TODO: Move to separate file. @@ -487,14 +480,6 @@ static NSString *MMSymlinkWarningString = // NO. if (flushDisabled) return; - // 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 (!force && lastFlushDate - && -[lastFlushDate timeIntervalSinceNow] < MMFlushTimeoutInterval - && [drawData length] < MMFlushQueueLenHint) - return; - if ([drawData length] > 0) { // HACK! Detect changes to 'guifontwide'. if (gui.wide_font != (GuiFont)oldWideFont) { @@ -523,9 +508,6 @@ static NSString *MMSymlinkWarningString = } [outputQueue removeAllObjects]; - - [lastFlushDate release]; - lastFlushDate = [[NSDate date] retain]; } } diff --git a/src/MacVim/gui_macvim.m b/src/MacVim/gui_macvim.m index 5e0ae5a9c9..990a07d298 100644 --- a/src/MacVim/gui_macvim.m +++ b/src/MacVim/gui_macvim.m @@ -225,12 +225,14 @@ gui_mch_update(void) void gui_mch_flush(void) { - [[MMBackend sharedInstance] flushQueue:NO]; + // This function is called way too often to be useful as a hint for + // flushing. If we were to flush every time it was called the screen would + // flicker. } /* Force flush output to MacVim. Do not call this method unless absolutely - * necessary (use gui_mch_flush() instead). */ + * necessary. */ void gui_macvim_force_flush(void) {