Fix pasting into terminal-mode on term.el
* lisp/term.el (term--xterm-paste): Read pasted text from the input event. Suggested by Jared Finder <jared@finder.org>. (Bug#49253)
This commit is contained in:
parent
5be94e2bce
commit
c3331cb365
1 changed files with 7 additions and 2 deletions
|
@ -1392,8 +1392,13 @@ Entry to this mode runs the hooks on `term-mode-hook'."
|
|||
|
||||
(defun term--xterm-paste ()
|
||||
"Insert the text pasted in an XTerm bracketed paste operation."
|
||||
(interactive)
|
||||
(term-send-raw-string (xterm--pasted-text)))
|
||||
(interactive "e")
|
||||
(unless (eq (car-safe event) 'xterm-paste)
|
||||
(error "term--xterm-paste must be found to xterm-paste event"))
|
||||
(let ((str (nth 1 event)))
|
||||
(unless (stringp str)
|
||||
(error "term--xterm-paste provided event does not contain paste text"))
|
||||
(term-send-raw-string str)))
|
||||
|
||||
(declare-function xterm--pasted-text "term/xterm" ())
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue