Skip to content

Commit 48172ce

Browse files
author
Inc0n
committed
Make C-k also copy same region, it would also kill
1 parent 3155a47 commit 48172ce

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

vterm.el

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -938,6 +938,14 @@ running in the terminal (like Emacs or Nano)."
938938
(memq 'shift modifiers)
939939
(memq 'meta modifiers)
940940
(memq 'control modifiers)))))
941+
942+
(defun vterm-send-C-k ()
943+
"Send `C-k' to the libvterm and copy that region."
944+
(interactive)
945+
(let ((end (save-excursion
946+
(end-of-visible-line) (point))))
947+
(copy-region-as-kill (point) end))
948+
(vterm-send "C-k"))
941949

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

0 commit comments

Comments
 (0)