1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-27 04:40:59 +01:00

11302: Cursor placement and defensive programming.

This commit is contained in:
Bart Schaefer 2000-05-10 15:22:34 +00:00
parent 8272e68ecc
commit f4e8281646
2 changed files with 9 additions and 5 deletions

View file

@ -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