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

vterm not showing selecting character unless in vterm-copy-mode #215

Closed
rdiaz02 opened this issue Nov 3, 2021 · 0 comments
Closed

vterm not showing selecting character unless in vterm-copy-mode #215

rdiaz02 opened this issue Nov 3, 2021 · 0 comments

Comments

@rdiaz02
Copy link

rdiaz02 commented Nov 3, 2021

Buffers with vterm (https://github.com/akermu/emacs-libvterm) will not show the selecting character unless they are in vterm-copy-mode. (An easy solution is to set the vterm-copy-mode minor mode to all vterm buffers right before invoking ace-window and change the vterm mode back right after it; see below).

This is not a major problem as it has a simple solution, so I am just reporting the issue, and closing it, in case someone else stumbles upon it.
Note this does not happen if we use posframe (see #204 or #192).


Instead of calling ace-window I call ace-window-vt as shown below

(defun ace-window-vt (arg)
  "ace-window setting all vterm to vterm-copy-mode."
  (interactive "p")
  (all-vterm-copy-mode)
  (ace-window arg)
  (no-vterm-copy-mode)
  )

(defun all-vterm-copy-mode ()
  "Set minor mode of all vterm buffers to vterm-copy-mode."
  (interactive)
  (mapc (lambda (buffer)
          (condition-case nil
              (with-current-buffer buffer
		(if (equal major-mode 'vterm-mode)
                    (vterm-copy-mode 1)
		  )
		)
            (buffer-read-only nil)))
        (buffer-list)))

(defun no-vterm-copy-mode ()
  "Disable copy mode from all vterm buffers."
  (interactive)
  (mapc (lambda (buffer)
          (condition-case nil
              (with-current-buffer buffer
		(if (equal major-mode 'vterm-mode)
                    (vterm-copy-mode -1)
		  )
		)
            (buffer-read-only nil)))
        (buffer-list)))

@rdiaz02 rdiaz02 closed this as completed Nov 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant