abicky / nodejs-repl.el

Run Node.js REPL and communicate with the process
190 stars 38 forks source link

use pop-to-buffer #9

Closed jordonbiondo closed 7 years ago

jordonbiondo commented 7 years ago

This PR replaces switch-to-buffer-other-window usage with pop-to-buffer.

switch-to-buffer-other-window is not ideal because it has the possibility of opening the buffer in a new window even though it is already displayed in one already.

IMO, if the node repl buffer is already displayed, emacs should not open it again in a different window, it should switch to the existing displayed window.

The behavior doesn't change that much, because when the node repl buffer is not displyed, it will be displayed in a different window.

abicky commented 7 years ago

Thank you for your PR. I didn't know pop-to-buffer. I like the behavior :)