Skip to content

Commit

Permalink
Make C-k also copy same region, it would also kill
Browse files Browse the repository at this point in the history
  • Loading branch information
Inc0n committed Jun 26, 2022
1 parent 3155a47 commit 48172ce
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions vterm.el
Original file line number Diff line number Diff line change
Expand Up @@ -938,6 +938,14 @@ running in the terminal (like Emacs or Nano)."
(memq 'shift modifiers)
(memq 'meta modifiers)
(memq 'control modifiers)))))

(defun vterm-send-C-k ()
"Send `C-k' to the libvterm and copy that region."
(interactive)
(let ((end (save-excursion
(end-of-visible-line) (point))))
(copy-region-as-kill (point) end))
(vterm-send "C-k"))

(defun vterm-send-start ()
"Output from the system is started when the system receives START."
Expand Down

0 comments on commit 48172ce

Please sign in to comment.