mirror of
https://github.com/textmate/textmate.git
synced 2026-04-06 03:01:29 -04:00
Use htmlOutputView.runningCommand instead of command::runner_t
The latter is updated via a dispatch queue and thus might be delayed (to after end of current event loop cycle). This is relevant when WebView itself terminates the URL loading and calls the “WebView should close” delegate method. Here the HTML output view property has been updated (via the WebView delegate method) but the command runner has not yet executed the completion code (which updates it’s “is running” state).
This commit is contained in:
@@ -77,7 +77,7 @@ OAK_DEBUG_VAR(HTMLOutputWindow);
|
||||
|
||||
- (BOOL)running
|
||||
{
|
||||
return _commandRunner->running();
|
||||
return self.htmlOutputView.runningCommand;
|
||||
}
|
||||
|
||||
- (BOOL)needsNewWebView
|
||||
@@ -88,7 +88,7 @@ OAK_DEBUG_VAR(HTMLOutputWindow);
|
||||
- (BOOL)windowShouldClose:(id)sender
|
||||
{
|
||||
D(DBF_HTMLOutputWindow, bug("\n"););
|
||||
if(!_commandRunner->running())
|
||||
if(!self.running)
|
||||
return YES;
|
||||
|
||||
NSAlert* alert = [NSAlert alertWithMessageText:@"Stop task before closing?" defaultButton:@"Stop Task" alternateButton:@"Cancel" otherButton:nil informativeTextWithFormat:@"The job that the task is performing will not be completed."];
|
||||
|
||||
Reference in New Issue
Block a user