[Fix #386] Add support for displaying the REPL in the current window