mirror of
https://github.com/zsh-users/zsh-autosuggestions.git
synced 2025-12-08 15:32:31 +01:00
Preserve ZLE_KILL and ZLE_YANK flags
This commit is contained in:
parent
a411ef3e09
commit
6e15a2d3de
3 changed files with 66 additions and 2 deletions
|
|
@ -51,8 +51,14 @@ _zsh_autosuggest_bind_widget() {
|
|||
# correctly. $WIDGET cannot be trusted because other plugins call
|
||||
# zle without the `-w` flag (e.g. `zle self-insert` instead of
|
||||
# `zle self-insert -w`).
|
||||
# Preserve the ZLE_KILL | ZLE_YANK flags for builtin widgets.
|
||||
eval "_zsh_autosuggest_bound_${bind_count}_${(q)widget}() {
|
||||
_zsh_autosuggest_widget_$autosuggest_action $prefix$bind_count-${(q)widget} \$@
|
||||
case ${(q)widget} in
|
||||
(${(j:|:)ZSH_AUTOSUGGEST_ZLE_KILL_WIDGETS}) zle -f 'kill';;
|
||||
(${(j:|:)ZSH_AUTOSUGGEST_ZLE_YANK_WIDGETS}) zle -f 'yank';;
|
||||
(${(j:|:)ZSH_AUTOSUGGEST_ZLE_YANKBEFORE_WIDGETS}) zle -f 'yankbefore';;
|
||||
esac
|
||||
}"
|
||||
|
||||
# Create the bound widget
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue