mirror of
https://github.com/zsh-users/zsh-autosuggestions.git
synced 2024-11-18 09:51:06 +01:00
Return if no completion found
This commit is contained in:
parent
8593624996
commit
7d968869e3
2 changed files with 4 additions and 0 deletions
|
@ -117,6 +117,8 @@ _zsh_autosuggest_strategy_completion() {
|
||||||
# Fetch the first completion result
|
# Fetch the first completion result
|
||||||
_zsh_autosuggest_capture_completion "$1"
|
_zsh_autosuggest_capture_completion "$1"
|
||||||
|
|
||||||
|
[[ -z "$completion" ]] && return
|
||||||
|
|
||||||
# Add the completion string to the buffer to build the full suggestion
|
# Add the completion string to the buffer to build the full suggestion
|
||||||
local -i i=1
|
local -i i=1
|
||||||
while [[ "$completion" != "${1[$i,-1]}"* ]]; do ((i++)); done
|
while [[ "$completion" != "${1[$i,-1]}"* ]]; do ((i++)); done
|
||||||
|
|
|
@ -616,6 +616,8 @@ _zsh_autosuggest_strategy_completion() {
|
||||||
# Fetch the first completion result
|
# Fetch the first completion result
|
||||||
_zsh_autosuggest_capture_completion "$1"
|
_zsh_autosuggest_capture_completion "$1"
|
||||||
|
|
||||||
|
[[ -z "$completion" ]] && return
|
||||||
|
|
||||||
# Add the completion string to the buffer to build the full suggestion
|
# Add the completion string to the buffer to build the full suggestion
|
||||||
local -i i=1
|
local -i i=1
|
||||||
while [[ "$completion" != "${1[$i,-1]}"* ]]; do ((i++)); done
|
while [[ "$completion" != "${1[$i,-1]}"* ]]; do ((i++)); done
|
||||||
|
|
Loading…
Reference in a new issue