Commit 26c3554f authored by Philipp Stephani's avatar Philipp Stephani

Send text received by bracketed paste to process

See Bug#24639.

* term.el (term--xterm-paste): New function.
(term-raw-map): Use it.
(xterm--pasted-text): Declare function from xterm.el.
parent db0b58da
......@@ -845,6 +845,7 @@ is buffer-local."
(define-key map [S-insert] 'term-paste)
(define-key map [prior] 'term-send-prior)
(define-key map [next] 'term-send-next)
(define-key map [xterm-paste] #'term--xterm-paste)
"Keyboard map for sending characters directly to the inferior process.")
......@@ -1211,6 +1212,13 @@ without any interpretation."
(term-send-raw-string (current-kill 0)))
(defun term--xterm-paste ()
"Insert the text pasted in an XTerm bracketed paste operation."
(term-send-raw-string (xterm--pasted-text)))
(declare-function xterm--pasted-text "term/xterm" ())
;; Which would be better: "\e[A" or "\eOA"? readline accepts either.
;; For my configuration it's definitely better \eOA but YMMV. -mm
;; For example: vi works with \eOA while elm wants \e[A ...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment