hsmw: Test for line-pre-redraw first

Issue #20
This commit is contained in:
Sebastian Gniazdowski 2020-01-15 02:58:42 +01:00
parent cb3755a089
commit ee864ea9a5

View file

@ -436,7 +436,6 @@ if [[ "$__hsmw_hcw_call_count" -eq "1" ]]; then
# Restore self-insert, backward-delete-char, delete-char # Restore self-insert, backward-delete-char, delete-char
zle -A hsmw-saved-self-insert self-insert zle -A hsmw-saved-self-insert self-insert
zle -A hsmw-saved-zle-line-pre-redraw zle-line-pre-redraw
zle -A hsmw-saved-backward-delete-char backward-delete-char zle -A hsmw-saved-backward-delete-char backward-delete-char
zle -A hsmw-saved-delete-char delete-char zle -A hsmw-saved-delete-char delete-char
(( __hsmw_reset_prompt_protect )) && zle -A hsmw-saved-reset-prompt reset-prompt (( __hsmw_reset_prompt_protect )) && zle -A hsmw-saved-reset-prompt reset-prompt
@ -446,6 +445,10 @@ if [[ "$__hsmw_hcw_call_count" -eq "1" ]]; then
zle -A hsmw-saved-zle-keymap-select zle-keymap-select zle -A hsmw-saved-zle-keymap-select zle-keymap-select
zle -D hsmw-saved-zle-keymap-select zle -D hsmw-saved-zle-keymap-select
} }
zle -la zle-line-pre-redraw && {
zle -A hsmw-saved-zle-line-pre-redraw zle-line-pre-redraw
zle -D hsmw-saved-zle-line-pre-redraw
}
# Restore ourselves # Restore ourselves
zle -A hsmw-saved-"$down_widget" "$down_widget" zle -A hsmw-saved-"$down_widget" "$down_widget"