fix(zsh): Only trigger up-arrow on first line (#1359)
* fix(zsh): Only trigger up-arrow on first line * fix(zsh): only trigger up-key if the buffer is 1 line
This commit is contained in:
parent
a1799af567
commit
e83bc6d632
1 changed files with 6 additions and 1 deletions
|
@ -50,7 +50,12 @@ _atuin_search() {
|
||||||
}
|
}
|
||||||
|
|
||||||
_atuin_up_search() {
|
_atuin_up_search() {
|
||||||
|
# Only trigger if the buffer is a single line
|
||||||
|
if [[ ! $BUFFER == *$'\n'* ]]; then
|
||||||
_atuin_search --shell-up-key-binding
|
_atuin_search --shell-up-key-binding
|
||||||
|
else
|
||||||
|
zle up-line
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
add-zsh-hook preexec _atuin_preexec
|
add-zsh-hook preexec _atuin_preexec
|
||||||
|
|
Loading…
Reference in a new issue