mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-11 15:37:29 +02:00
Merge pull request #1046 from ichizok/fix/latency
Reduce processing-queue latency
This commit is contained in:
@@ -633,6 +633,7 @@ extern GuiFont gui_mch_retain_font(GuiFont font);
|
||||
while (CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, true)
|
||||
== kCFRunLoopRunHandledSource)
|
||||
; // do nothing
|
||||
[self processInputQueue];
|
||||
}
|
||||
|
||||
- (void)flushQueue:(BOOL)force
|
||||
@@ -729,8 +730,7 @@ extern GuiFont gui_mch_retain_font(GuiFont font);
|
||||
|
||||
// The above calls may have placed messages on the input queue so process
|
||||
// it now. This call may enter a blocking loop.
|
||||
if ([inputQueue count] > 0)
|
||||
[self processInputQueue];
|
||||
[self processInputQueue];
|
||||
|
||||
return inputReceived;
|
||||
}
|
||||
|
||||
@@ -347,12 +347,19 @@ gui_mch_update(void)
|
||||
|
||||
CFAbsoluteTime nowTime = CFAbsoluteTimeGetCurrent();
|
||||
if (nowTime - lastTime > 1.0 / 30) {
|
||||
[[MMBackend sharedInstance] update];
|
||||
gui_macvim_update();
|
||||
lastTime = nowTime;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
gui_macvim_update(void)
|
||||
{
|
||||
[[MMBackend sharedInstance] update];
|
||||
}
|
||||
|
||||
|
||||
/* Flush any output to the screen */
|
||||
void
|
||||
gui_mch_flush(void)
|
||||
|
||||
@@ -17,6 +17,8 @@ gui_mch_open(void);
|
||||
void
|
||||
gui_mch_update(void);
|
||||
void
|
||||
gui_macvim_update(void);
|
||||
void
|
||||
gui_mch_flush(void);
|
||||
void
|
||||
gui_macvim_flush(void);
|
||||
|
||||
@@ -432,7 +432,7 @@ for g:testfunc in sort(s:tests)
|
||||
" tests pending for now before a more proper fix is implemented.
|
||||
call extend(s:messages, [
|
||||
\ 'Flaky test failed too often, giving up',
|
||||
\ 'MacVim marked ' . s:test . ' as pending',
|
||||
\ 'MacVim marked ' . g:testfunc . ' as pending',
|
||||
\ ])
|
||||
let v:errors = []
|
||||
endif
|
||||
|
||||
@@ -609,7 +609,7 @@ func Nb_basic(port)
|
||||
|
||||
" detach
|
||||
call appendbufline(cmdbufnr, '$', 'detach_Test')
|
||||
call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 6)')
|
||||
call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 8)')
|
||||
let l = readfile('Xnetbeans')
|
||||
call assert_equal('0:disconnect=91', l[-1])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user