term/{eshell,vterm}: remove already in * buffer check
Allows users to spawn additional eshell/vterm buffers, if they like.
This commit is contained in:
parent
aff5cc5b28
commit
2485123164
2 changed files with 0 additions and 4 deletions
|
@ -117,8 +117,6 @@
|
||||||
(defun +eshell/here (&optional command)
|
(defun +eshell/here (&optional command)
|
||||||
"Open eshell in the current buffer."
|
"Open eshell in the current buffer."
|
||||||
(interactive "P")
|
(interactive "P")
|
||||||
(when (eq major-mode 'eshell-mode)
|
|
||||||
(user-error "Already in an eshell buffer"))
|
|
||||||
(let ((buf (+eshell--unused-buffer)))
|
(let ((buf (+eshell--unused-buffer)))
|
||||||
(with-current-buffer (switch-to-buffer buf)
|
(with-current-buffer (switch-to-buffer buf)
|
||||||
(if (eq major-mode 'eshell-mode)
|
(if (eq major-mode 'eshell-mode)
|
||||||
|
|
|
@ -46,8 +46,6 @@ If prefix ARG is non-nil, cd into `default-directory' instead of project root."
|
||||||
(interactive "P")
|
(interactive "P")
|
||||||
(unless (fboundp 'module-load)
|
(unless (fboundp 'module-load)
|
||||||
(user-error "Your build of Emacs lacks dynamic modules support and cannot load vterm"))
|
(user-error "Your build of Emacs lacks dynamic modules support and cannot load vterm"))
|
||||||
(when (eq major-mode 'vterm-mode)
|
|
||||||
(user-error "Already in a vterm buffer"))
|
|
||||||
(require 'vterm)
|
(require 'vterm)
|
||||||
;; This hack forces vterm to redraw, fixing strange artefacting in the tty.
|
;; This hack forces vterm to redraw, fixing strange artefacting in the tty.
|
||||||
(save-window-excursion
|
(save-window-excursion
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue