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.
This PR replaces
switch-to-buffer-other-window
usage withpop-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.