diff options
| author | Bart Schaefer <barts@users.sourceforge.net> | 2000-05-10 15:22:34 +0000 |
|---|---|---|
| committer | Bart Schaefer <barts@users.sourceforge.net> | 2000-05-10 15:22:34 +0000 |
| commit | f4e82816468d1031d72eb82acd9ed4beb1bbf137 (patch) | |
| tree | 88c2705635b0908f6cbf5a03bc4d35442b5431cc | |
| parent | AIX dependency fix (diff) | |
| download | zsh-f4e82816468d1031d72eb82acd9ed4beb1bbf137.tar zsh-f4e82816468d1031d72eb82acd9ed4beb1bbf137.tar.gz zsh-f4e82816468d1031d72eb82acd9ed4beb1bbf137.tar.bz2 zsh-f4e82816468d1031d72eb82acd9ed4beb1bbf137.tar.lz zsh-f4e82816468d1031d72eb82acd9ed4beb1bbf137.tar.xz zsh-f4e82816468d1031d72eb82acd9ed4beb1bbf137.tar.zst zsh-f4e82816468d1031d72eb82acd9ed4beb1bbf137.zip | |
11302: Cursor placement and defensive programming.
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | Functions/Zle/edit-command-line | 9 |
2 files changed, 9 insertions, 5 deletions
@@ -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> * 11301: Src/Zle/zle_misc.c: AIX dependency fix 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 |
