diff options
| author | Yubao Liu <yubao.liu@gmail.com> | 2021-01-30 23:13:50 +0800 |
|---|---|---|
| committer | Yubao Liu <yubao.liu@gmail.com> | 2021-01-30 23:13:50 +0800 |
| commit | 32a6171915d64fca5eb02bbdc6888f66927512c1 (patch) | |
| tree | 94da598d25e230b9e8383e30f9191ab8dd45051e /vterm.el | |
| parent | c43e30ceae731ff7cba812deb0b1872528724134 (diff) | |
deactivate mark on key input
Inspired by emacs/lisp/term.el:term-send-raw-string, fixed issue
https://github.com/akermu/emacs-libvterm/issues/489.
Diffstat (limited to 'vterm.el')
| -rw-r--r-- | vterm.el | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -797,6 +797,7 @@ will invert `vterm-copy-exclude-prompt' for that call." (defun vterm-send-key (key &optional shift meta ctrl) "Send KEY to libvterm with optional modifiers SHIFT, META and CTRL." + (deactivate-mark) (when vterm--term (let ((inhibit-redisplay t) (inhibit-read-only t)) @@ -829,6 +830,7 @@ will invert `vterm-copy-exclude-prompt' for that call." (defun vterm-send-return () "Send `C-m' to the libvterm." (interactive) + (deactivate-mark) (when vterm--term (if (vterm--get-icrnl vterm--term) (process-send-string vterm--process "\C-j") @@ -939,6 +941,7 @@ prefix argument ARG or with \\[universal-argument]." Argument ARG is passed to `yank'." (interactive "P") + (deactivate-mark) (vterm-goto-char (point)) (let ((inhibit-read-only t)) (cl-letf (((symbol-function 'insert-for-yank) #'vterm-insert)) |
