diff --git a/vterm.el b/vterm.el index 630b50e..af19092 100644 --- a/vterm.el +++ b/vterm.el @@ -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."