1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-27 16:50:58 +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

@ -1,3 +1,8 @@
2000-05-10 Bart Schaefer <schaefer@zsh.org>
* 11302: Functions/Zle/edit-command-line: Cursor placement and
defensive programming.
2000-05-10 Oliver Kiddle <opk@zsh.org> 2000-05-10 Oliver Kiddle <opk@zsh.org>
* 11301: Src/Zle/zle_misc.c: AIX dependency fix * 11301: Src/Zle/zle_misc.c: AIX dependency fix

View file

@ -7,12 +7,11 @@
local tmpfile=${TMPPREFIX:-/tmp/zsh}ecl$$ local tmpfile=${TMPPREFIX:-/tmp/zsh}ecl$$
print $BUFFER >$tmpfile print -R - "$BUFFER" >$tmpfile
exec </dev/tty exec </dev/tty
${VISUAL:-${EDITOR:-vi}} $tmpfile ${VISUAL:-${EDITOR:-vi}} $tmpfile
LBUFFER= BUFFER="$(<$tmpfile)"
RBUFFER= CURSOR=$#BUFFER
BUFFER=$(<$tmpfile)
rm -f $tmpfile command rm -f $tmpfile
zle redisplay zle redisplay