summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2015-12-19 10:48:34 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2015-12-19 10:48:48 +0000
commit1f2bdc2aa27141eb41f7b0765d79020b6af8bbd0 (patch)
tree2e0b0ab9995611b54a13dff939a927e4a32c0ad7
parent9d2fe86564ad4d25d75a27b772e30a98de131842 (diff)
downloadzsh-1f2bdc2aa27141eb41f7b0765d79020b6af8bbd0.tar.gz
zsh-1f2bdc2aa27141eb41f7b0765d79020b6af8bbd0.zip
unposted (after users/20873): Theoretical fix: don't parse print/echo escape sequences in $zle_bracketed_paste.
-rw-r--r--ChangeLog4
-rw-r--r--Functions/Zle/edit-command-line4
2 files changed, 6 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 9f1b980f2..54248963f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2015-12-19 Daniel Shahaf <d.s@daniel.shahaf.name>
+ * unposted (after users/20873): Functions/Zle/edit-command-line:
+ Theoretical fix: don't parse print/echo escape sequences in
+ $zle_bracketed_paste.
+
* 37257 (in part): Test/A06assign.ztst: Add array assignment tests.
2015-12-16 Peter Stephenson <p.stephenson@samsung.com>
diff --git a/Functions/Zle/edit-command-line b/Functions/Zle/edit-command-line
index b8145525f..353f2609a 100644
--- a/Functions/Zle/edit-command-line
+++ b/Functions/Zle/edit-command-line
@@ -12,7 +12,7 @@
# Compute the cursor's position in bytes, not characters.
setopt localoptions nomultibyte noksharrays
- (( $+zle_bracketed_paste )) && print -n $zle_bracketed_paste[2]
+ (( $+zle_bracketed_paste )) && print -r -n - $zle_bracketed_paste[2]
# Open the editor, placing the cursor at the right place if we know how.
local editor=${${VISUAL:-${EDITOR:-vi}}}
@@ -26,7 +26,7 @@
(*) ${=editor} $1;;
esac
- (( $+zle_bracketed_paste )) && print -n $zle_bracketed_paste[1]
+ (( $+zle_bracketed_paste )) && print -r -n - $zle_bracketed_paste[1]
# Replace the buffer with the editor output.
print -Rz - "$(<$1)"