diff --git a/bin/sim.m b/bin/sim.m index fc39e8dd..5ef96a4d 100644 --- a/bin/sim.m +++ b/bin/sim.m @@ -270,6 +270,9 @@ refresh_repl_prompt(NSString *top_level, bool clear) previous_prompt_length = strlen(rl_prompt); } +#define CONCURRENT_BEGIN dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ +#define CONCURRENT_END }); + static CGEventRef event_tap_cb(CGEventTapProxy proxy, CGEventType type, CGEventRef event, void *ctx) @@ -277,12 +280,14 @@ event_tap_cb(CGEventTapProxy proxy, CGEventType type, CGEventRef event, static bool previousHighlight = false; if (!(CGEventGetFlags(event) & kCGEventFlagMaskCommand)) { +CONCURRENT_BEGIN if (previousHighlight) { [delegate replEval:[NSString stringWithFormat: @"<