mirror of
https://github.com/zsh-users/zsh-autosuggestions.git
synced 2024-11-18 09:51:06 +01:00
Merge pull request #59 from jirutka/patch-4
Fix indentation in autosuggest-backward-delete-char()
This commit is contained in:
commit
8d29045ffb
1 changed files with 8 additions and 7 deletions
|
@ -163,13 +163,14 @@ autosuggest-insert-or-space() {
|
||||||
autosuggest-backward-delete-char() {
|
autosuggest-backward-delete-char() {
|
||||||
if (( $#LBUFFER > 1 )); then
|
if (( $#LBUFFER > 1 )); then
|
||||||
setopt localoptions noshwordsplit noksharrays
|
setopt localoptions noshwordsplit noksharrays
|
||||||
if [[ $LBUFFER = *$'\012'* || $LASTWIDGET != (self-insert|magic-space|backward-delete-char) ]]; then
|
|
||||||
LBUFFER="$LBUFFER[1,-2]"
|
if [[ $LBUFFER = *$'\012'* || $LASTWIDGET != (self-insert|magic-space|backward-delete-char) ]]; then
|
||||||
else
|
LBUFFER="$LBUFFER[1,-2]"
|
||||||
((--CURSOR))
|
else
|
||||||
autosuggest-invalidate-highlight-cache
|
((--CURSOR))
|
||||||
zle .history-beginning-search-forward || RBUFFER=''
|
autosuggest-invalidate-highlight-cache
|
||||||
fi
|
zle .history-beginning-search-forward || RBUFFER=''
|
||||||
|
fi
|
||||||
autosuggest-highlight-suggested-text
|
autosuggest-highlight-suggested-text
|
||||||
else
|
else
|
||||||
zle .kill-whole-line
|
zle .kill-whole-line
|
||||||
|
|
Loading…
Reference in a new issue