Skip to content

Commit

Permalink
Offer suggestion only if cursor is at end of line
Browse files Browse the repository at this point in the history
  • Loading branch information
vaeth committed Jun 18, 2018
1 parent 3f4c2ac commit 2d0806a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions zsh-autosuggestions.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ _zsh_autosuggest_modify() {

# Fetch a new suggestion based on what's currently in the buffer
_zsh_autosuggest_fetch() {
[[ $CURSOR -eq $#BUFFER ]] || return 0
if [[ -n "${ZSH_AUTOSUGGEST_USE_ASYNC+x}" ]]; then
_zsh_autosuggest_async_request "$BUFFER"
else
Expand Down

0 comments on commit 2d0806a

Please sign in to comment.