Skip to content

Commit 6cf7aac

Browse files
committed
Set the vterm buffer's major mode before displaying the buffer.
This aligns with the behavior of other terminal emulator modes (e.g. term and ansi-term) and comint-derived modes (e.g. ielm, SQLi, and inferior Python).
1 parent 056ad74 commit 6cf7aac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vterm.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1503,10 +1503,10 @@ value of `vterm-buffer-name'."
15031503
(t
15041504
(get-buffer-create vterm-buffer-name)))))
15051505
(cl-assert (and buf (buffer-live-p buf)))
1506-
(funcall pop-to-buf-fun buf)
15071506
(with-current-buffer buf
15081507
(unless (derived-mode-p 'vterm-mode)
15091508
(vterm-mode)))
1509+
(funcall pop-to-buf-fun buf)
15101510
buf))
15111511

15121512
;;; Internal

0 commit comments

Comments
 (0)