GNU bug report logs -
#24639
26.0.50; Terminal paste doesn't work right in term char mode
Previous Next
Reported by: Philipp <p.stephani2 <at> gmail.com>
Date: Fri, 7 Oct 2016 18:04:01 UTC
Severity: normal
Found in version 26.0.50
Done: Philipp Stephani <p.stephani2 <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
From: Philipp Stephani <phst <at> google.com>
Fixes #24639
* term.el (term--xterm-paste): New function.
(term-raw-map): Use it.
(xterm--pasted-text): Declare function from xterm.el.
---
lisp/term.el | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/lisp/term.el b/lisp/term.el
index 993e580..18d6775 100644
--- a/lisp/term.el
+++ b/lisp/term.el
@@ -845,6 +845,7 @@ term-raw-map
(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)
map)
"Keyboard map for sending characters directly to the inferior process.")
@@ -1211,6 +1212,13 @@ term-paste
(interactive)
(term-send-raw-string (current-kill 0)))
+(defun term--xterm-paste ()
+ "Insert the text pasted in an XTerm bracketed paste operation."
+ (interactive)
+ (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 ...
--
2.10.1
This bug report was last modified 8 years and 249 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.