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:
parent
8272e68ecc
commit
f4e8281646
2 changed files with 9 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue