Skip to content

Commit

Permalink
Closing help brings REPL to front
Browse files Browse the repository at this point in the history
  • Loading branch information
run4flat committed Jun 17, 2014
1 parent 78d6547 commit 90637cd
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions lib/App/Prima/REPL.pm
Expand Up @@ -302,9 +302,15 @@ sub get_help {
}

# Make sure the the opened help is visible (but check that the active
# window is defined, as this can cause trouble on Windows).
$::application->get_active_window->bring_to_front
if $::application->get_active_window;
# window is defined, as this can cause trouble on Windows). Also, make
# sure that the REPL gets focus again when the help window closes.
if ($::application->get_active_window) {
$::application->get_active_window->bring_to_front;
$::application->get_active_window->onClose(sub {
$self->window->select(1);
$::application->get_active_window->bring_to_front;
});
}
}

# Add some accelerator keys to the window for easier navigaton:
Expand Down

0 comments on commit 90637cd

Please sign in to comment.