about summary refs log tree commit diff
path: root/Functions
diff options
context:
space:
mode:
Diffstat (limited to 'Functions')
-rw-r--r--Functions/Zle/edit-command-line9
1 files changed, 4 insertions, 5 deletions
diff --git a/Functions/Zle/edit-command-line b/Functions/Zle/edit-command-line
index 8019329bd..ab2134caf 100644
--- a/Functions/Zle/edit-command-line
+++ b/Functions/Zle/edit-command-line
@@ -7,12 +7,11 @@
 
 local tmpfile=${TMPPREFIX:-/tmp/zsh}ecl$$
 
-print $BUFFER >$tmpfile
+print -R - "$BUFFER" >$tmpfile
 exec </dev/tty
 ${VISUAL:-${EDITOR:-vi}} $tmpfile
-LBUFFER=
-RBUFFER=
-BUFFER=$(<$tmpfile)
+BUFFER="$(<$tmpfile)"
+CURSOR=$#BUFFER
 
-rm -f $tmpfile
+command rm -f $tmpfile
 zle redisplay