summaryrefslogtreecommitdiff
path: root/Functions/Zle
diff options
context:
space:
mode:
Diffstat (limited to 'Functions/Zle')
-rw-r--r--Functions/Zle/bracketed-paste-magic4
-rw-r--r--Functions/Zle/insert-composed-char4
-rw-r--r--Functions/Zle/smart-insert-last-word5
3 files changed, 7 insertions, 6 deletions
diff --git a/Functions/Zle/bracketed-paste-magic b/Functions/Zle/bracketed-paste-magic
index 4baae823e..840091b44 100644
--- a/Functions/Zle/bracketed-paste-magic
+++ b/Functions/Zle/bracketed-paste-magic
@@ -162,7 +162,7 @@ bracketed-paste-magic() {
# There are active widgets. Reprocess $PASTED as keystrokes.
NUMERIC=1
- zle -U - $PASTED
+ zle -U - "$PASTED"
# Just in case there are active undo widgets
@@ -212,7 +212,7 @@ bracketed-paste-magic() {
# Arrange to display highlighting if necessary
if [[ -z $zle_highlight || -n ${(M)zle_highlight:#paste:*} ]]; then
zle -R
- zle .read-command && zle -U - $KEYS
+ zle .read-command && zle -U - "$KEYS"
fi
}
diff --git a/Functions/Zle/insert-composed-char b/Functions/Zle/insert-composed-char
index c0922e7d4..636895a89 100644
--- a/Functions/Zle/insert-composed-char
+++ b/Functions/Zle/insert-composed-char
@@ -27,7 +27,7 @@
# ' Acute
# > Circumflex
# ? Tilde
-# - Macron. (A horizonal bar over the letter.)
+# - Macron. (A horizontal bar over the letter.)
# ( Breve. (A shallow dish shape over the letter.)
# . Dot above, or no dot with lower case i, or dot in the middle of L or l.
# : Diaeresis (Umlaut)
@@ -43,7 +43,7 @@
# 9 Horn
# Hence A! is upper case A with a grave, c, is lower case c with cedilla.
#
-# Some other composed charaters:
+# Some other composed characters:
# Various ligatures:
# AE ae OE oe IJ ij
#
diff --git a/Functions/Zle/smart-insert-last-word b/Functions/Zle/smart-insert-last-word
index cf8715dfe..05f23cba6 100644
--- a/Functions/Zle/smart-insert-last-word
+++ b/Functions/Zle/smart-insert-last-word
@@ -48,13 +48,14 @@ zle auto-suffix-retain
# Not strictly necessary:
# (($+_ilw_hist)) || integer -g _ilw_hist _ilw_count _ilw_cursor _ilw_lcursor _ilw_changeno
+# (($+_ilw_result)) || typeset -g _ilw_result
integer cursor=$CURSOR lcursor=$CURSOR
local lastcmd pattern numeric=$NUMERIC
# Save state for repeated calls
if (( HISTNO == _ilw_hist && cursor == _ilw_cursor &&
- UNDO_CHANGE_NO == _ilw_changeno ))
+ UNDO_CHANGE_NO == _ilw_changeno )) && [[ $BUFFER == $_ilw_result ]]
then
NUMERIC=$[_ilw_count+1]
lcursor=$_ilw_lcursor
@@ -119,7 +120,7 @@ fi
(( NUMERIC > $#lastcmd )) && return 1
LBUFFER[lcursor+1,cursor+1]=$lastcmd[-NUMERIC]
-typeset -g _ilw_cursor=$CURSOR
+typeset -g _ilw_cursor=$CURSOR _ilw_result=$BUFFER
# This is necessary to update UNDO_CHANGE_NO immediately
zle split-undo && typeset -g _ilw_changeno=$UNDO_CHANGE_NO