mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-12-25 00:21:58 +00:00
replace TRAPINT function with trap statement; the former triggers memory corruption bug in zsh
This commit is contained in:
parent
551dd0c277
commit
d4265ab279
1 changed files with 9 additions and 8 deletions
|
@ -4204,6 +4204,14 @@ _p9k_precmd_impl() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_p9k_trapint() {
|
||||||
|
if (( __p9k_enabled )); then
|
||||||
|
emulate -L zsh
|
||||||
|
setopt no_hist_expand extended_glob no_prompt_bang prompt_{percent,subst}
|
||||||
|
_p9k_zle_line_finish
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
_p9k_precmd() {
|
_p9k_precmd() {
|
||||||
__p9k_new_status=$?
|
__p9k_new_status=$?
|
||||||
__p9k_new_pipestatus=($pipestatus)
|
__p9k_new_pipestatus=($pipestatus)
|
||||||
|
@ -4216,14 +4224,7 @@ _p9k_precmd() {
|
||||||
setopt nopromptbang prompt_percent prompt_subst
|
setopt nopromptbang prompt_percent prompt_subst
|
||||||
|
|
||||||
if (( ! $+functions[TRAPINT] )); then
|
if (( ! $+functions[TRAPINT] )); then
|
||||||
function TRAPINT() {
|
trap '_p9k_trapint; return 130' INT
|
||||||
if (( __p9k_enabled )); then
|
|
||||||
emulate -L zsh
|
|
||||||
setopt no_hist_expand extended_glob no_prompt_bang prompt_{percent,subst}
|
|
||||||
_p9k_zle_line_finish
|
|
||||||
fi
|
|
||||||
return 130
|
|
||||||
}
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue