Skip to content

Commit 32418b9

Browse files
authored
Merge pull request #407 from macvim-dev/revert-406-fix/timer-feedkeys
Revert "Fix #401"
2 parents 28f88ac + abeb366 commit 32418b9

File tree

3 files changed

+1
-51
lines changed

3 files changed

+1
-51
lines changed

src/MacVim/MMBackend.m

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,6 @@ - (void)handleGesture:(NSData *)data;
198198
#ifdef FEAT_BEVAL
199199
- (void)bevalCallback:(id)sender;
200200
#endif
201-
#ifdef MESSAGE_QUEUE
202-
- (void)checkForProcessEvents:(NSTimer *)timer;
203-
#endif
204201
@end
205202

206203

@@ -685,20 +682,6 @@ - (BOOL)waitForInput:(int)milliseconds
685682
if ([inputQueue count]) {
686683
inputReceived = YES;
687684
} else {
688-
NSTimer *timer = nil;
689-
690-
// Set interval timer which checks for the events of job and channel
691-
// when there is any pending job or channel.
692-
if (has_any_channel() || has_pending_job()) {
693-
timer = [NSTimer scheduledTimerWithTimeInterval:0.1
694-
target:self
695-
selector:@selector(checkForProcessEvents:)
696-
userInfo:nil
697-
repeats:YES];
698-
[[NSRunLoop currentRunLoop] addTimer:timer
699-
forMode:NSDefaultRunLoopMode];
700-
}
701-
702685
// Wait for the specified amount of time, unless 'milliseconds' is
703686
// negative in which case we wait "forever" (1e6 seconds translates to
704687
// approximately 11 days).
@@ -712,11 +695,6 @@ - (BOOL)waitForInput:(int)milliseconds
712695
dt = 0.0;
713696
inputReceived = YES;
714697
}
715-
716-
if (input_available())
717-
inputReceived = YES;
718-
719-
[timer invalidate];
720698
}
721699

722700
// The above calls may have placed messages on the input queue so process
@@ -3026,22 +3004,6 @@ - (void)bevalCallback:(id)sender
30263004
}
30273005
#endif
30283006

3029-
#ifdef MESSAGE_QUEUE
3030-
- (void)checkForProcessEvents:(NSTimer *)timer
3031-
{
3032-
# ifdef FEAT_TIMERS
3033-
did_add_timer = FALSE;
3034-
# endif
3035-
3036-
parse_queued_messages();
3037-
3038-
# ifdef FEAT_TIMERS
3039-
if (did_add_timer || input_available())
3040-
CFRunLoopStop(CFRunLoopGetCurrent());
3041-
# endif
3042-
}
3043-
#endif
3044-
30453007
@end // MMBackend (Private)
30463008

30473009

src/MacVim/gui_macvim.m

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -407,21 +407,9 @@
407407
[[MMBackend sharedInstance] flushQueue:YES];
408408

409409
#ifdef MESSAGE_QUEUE
410-
# ifdef FEAT_TIMERS
411-
did_add_timer = FALSE;
412-
# endif
413-
414410
parse_queued_messages();
415-
416-
# ifdef FEAT_TIMERS
417-
if (did_add_timer)
418-
return FAIL;
419-
# endif
420411
#endif
421412

422-
if (input_available())
423-
return OK;
424-
425413
return [[MMBackend sharedInstance] waitForInput:wtime];
426414
}
427415

src/testdir/test_channel.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1396,7 +1396,7 @@ function MyExitTimeCb(job, status)
13961396
endfunction
13971397

13981398
func Test_exit_callback_interval()
1399-
if !has('job')
1399+
if !has('job') || has('gui_macvim')
14001400
return
14011401
endif
14021402

0 commit comments

Comments
 (0)