Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simply vterm backend code now that an issue has been fixed. #146

Merged
merged 2 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
- 27.2
- 28.1
- 28.2
- 29.1
ignore_warnings:
- true
include:
Expand Down
8 changes: 1 addition & 7 deletions julia-repl.el
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,6 @@ When PASTE-P, “bracketed paste” mode will be used. When RET-P, terminate wit
(goto-char (point))
(compilation-next-error-function n reset))

(defun julia-repl--has-running-vterm-process (inferior-buffer)
"Return non-nil if ‘inferior-buffer’ has a running vterm process."
(let ((proc (buffer-local-value 'vterm--process inferior-buffer)))
(and proc (memq (process-status proc) '(run stop open listen connect)))))

(cl-defstruct julia-repl--buffer-vterm
"Terminal backend using ‘vterm’, which needs to be installed and loaded.")

Expand All @@ -212,8 +207,7 @@ When PASTE-P, “bracketed paste” mode will be used. When RET-P, terminate wit
(if-let ((inferior-buffer (get-buffer (julia-repl--add-earmuffs name))))
(with-current-buffer inferior-buffer
(cl-assert (eq major-mode 'vterm-mode) nil "Expected vterm-mode. Changed mode or backends?")
;; cf https://github.com/akermu/emacs-libvterm/issues/270
(when (julia-repl--has-running-vterm-process inferior-buffer)
(when (vterm-check-proc inferior-buffer)
inferior-buffer))))

(cl-defmethod julia-repl--make-buffer ((_terminal-backend julia-repl--buffer-vterm)
Expand Down
Loading