Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 0 additions & 38 deletions src/MacVim/MMBackend.m
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,6 @@ - (void)handleGesture:(NSData *)data;
#ifdef FEAT_BEVAL
- (void)bevalCallback:(id)sender;
#endif
#ifdef MESSAGE_QUEUE
- (void)checkForProcessEvents:(NSTimer *)timer;
#endif
@end


Expand Down Expand Up @@ -685,20 +682,6 @@ - (BOOL)waitForInput:(int)milliseconds
if ([inputQueue count]) {
inputReceived = YES;
} else {
NSTimer *timer = nil;

// Set interval timer which checks for the events of job and channel
// when there is any pending job or channel.
if (has_any_channel() || has_pending_job()) {
timer = [NSTimer scheduledTimerWithTimeInterval:0.1
target:self
selector:@selector(checkForProcessEvents:)
userInfo:nil
repeats:YES];
[[NSRunLoop currentRunLoop] addTimer:timer
forMode:NSDefaultRunLoopMode];
}

// Wait for the specified amount of time, unless 'milliseconds' is
// negative in which case we wait "forever" (1e6 seconds translates to
// approximately 11 days).
Expand All @@ -712,11 +695,6 @@ - (BOOL)waitForInput:(int)milliseconds
dt = 0.0;
inputReceived = YES;
}

if (input_available())
inputReceived = YES;

[timer invalidate];
}

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

#ifdef MESSAGE_QUEUE
- (void)checkForProcessEvents:(NSTimer *)timer
{
# ifdef FEAT_TIMERS
did_add_timer = FALSE;
# endif

parse_queued_messages();

# ifdef FEAT_TIMERS
if (did_add_timer || input_available())
CFRunLoopStop(CFRunLoopGetCurrent());
# endif
}
#endif

@end // MMBackend (Private)


Expand Down
12 changes: 0 additions & 12 deletions src/MacVim/gui_macvim.m
Original file line number Diff line number Diff line change
Expand Up @@ -407,21 +407,9 @@
[[MMBackend sharedInstance] flushQueue:YES];

#ifdef MESSAGE_QUEUE
# ifdef FEAT_TIMERS
did_add_timer = FALSE;
# endif

parse_queued_messages();

# ifdef FEAT_TIMERS
if (did_add_timer)
return FAIL;
# endif
#endif

if (input_available())
return OK;

return [[MMBackend sharedInstance] waitForInput:wtime];
}

Expand Down
2 changes: 1 addition & 1 deletion src/testdir/test_channel.vim
Original file line number Diff line number Diff line change
Expand Up @@ -1396,7 +1396,7 @@ function MyExitTimeCb(job, status)
endfunction

func Test_exit_callback_interval()
if !has('job')
if !has('job') || has('gui_macvim')
return
endif

Expand Down