Fix open editor when editor is "emacs -nw"