-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v0.4.3 #332
Merged
Merged
v0.4.3 #332
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Member
ericfreese
commented
May 21, 2018
•
edited
Loading
edited
- Review readme
- Update changelog
- Bump version
`_zsh_autosuggest_widget_accept()` (&al.) passes this function's return status on, and ZLE rings the bell if it's >0. Not having an original widget isn't an error condition, so always returning 0 here should be OK to avoid the bell Fixes #228
Avoid ringing bell when accepting suggestions
These widgets rely on `$LASTWIDGET` being set to restore the cursor position. When asynchronous suggestions are enabled, and the widget triggers a suggestion to be fetched, `autosuggest-suggest` will be called and $LASTWIDGET will be set to it.
Don't fetch suggestions after [up,down]-line-or-beginning-search
Useful with `binding.pry` to inspect behavior of tests.
Specific case where this matters is following: Be in vi insert mode with some text in the buffer and the cursor at the end of the buffer. Press `esc` to trigger `vi-cmd-mode widget`, then before the cursor moves (KEYTIMEOUT), press `h` to trigger `vi-backward-char` widget. When `vi-cmd-mode` original widget exits, KEYS_QUEUED_COUNT will be non-zero and the suggestion will be lost.
Issue #188. PR #324. Thanks to @toadjaune and @IngoHeimbach.
For unknown reasons, the pty will occasionally quit running. In these cases, we still want to remove it so that a fresh one can be created. We don't actually need this check because error messages from `zle` and `zpty` are redirected to /dev/null. One sure way to kill all currently running pty's is to run `exit` in a subshell. Even without zsh-autosuggestions loaded, the following works: % zmodload zsh/zpty % zpty -b foo cat % zpty -b bar cat % zpty (31689) bar: cat (31666) foo: cat % $(exit) % zpty (finished) bar: cat (finished) foo: cat
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.