aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorRoman Perepelitsa <roman.perepelitsa@gmail.com>2020-08-28 10:38:16 +0300
committerRoman Perepelitsa <roman.perepelitsa@gmail.com>2020-08-28 10:38:16 +0300
commitb673e6a7dde2a91a00a72614fbbce8e1e9f28f2c (patch)
tree9432a1481b41873e6d99dc0214a9d6d1ba67a974 /internal
parentf2bf0197581abb8bde529e6b492710948549ba7f (diff)
bug fix: trigger transient prompt on send-break
Diffstat (limited to 'internal')
-rw-r--r--internal/p10k.zsh18
1 files changed, 17 insertions, 1 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index 3b4b3460..c0757332 100644
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -7241,6 +7241,10 @@ function _p9k_on_widget_zle-line-finish() {
_p9k__line_finished='%{%}'
}
+function _p9k_on_widget_send-break() {
+ _p9k_on_widget_zle-line-finish int
+}
+
# Usage example: _p9k_display_segment 58 _p9k__1rkubecontext hide
function _p9k_display_segment() {
[[ $_p9k__display_v[$1] == $3 ]] && return
@@ -7332,6 +7336,14 @@ function _p9k_widget() {
return res
}
+function _p9k_widget_send-break() {
+ (( ! __p9k_enabled )) || [[ $CONTEXT != start ]] || {
+ _p9k_widget_hook send-break "$@"
+ }
+ local f=${widgets[._p9k_orig_send-break]:-}
+ [[ -z $f ]] || zle ._p9k_orig_send-break -- "$@"
+}
+
typeset -gi __p9k_widgets_wrapped=0
function _p9k_wrap_widgets() {
@@ -7350,6 +7362,7 @@ function _p9k_wrap_widgets() {
visual-line-mode
deactivate-region
clear-screen
+ send-break
$_POWERLEVEL9K_HOOK_WIDGETS
)
else
@@ -7366,6 +7379,7 @@ function _p9k_wrap_widgets() {
zle-line-finish
zle-history-line-set
zle-keymap-select
+ send-break
$_POWERLEVEL9K_HOOK_WIDGETS
${${${(f)"$(<$tmp)"}##* }:#(*\"|.*)}
)
@@ -7375,7 +7389,9 @@ function _p9k_wrap_widgets() {
fi
local widget
for widget in $widget_list; do
- functions[_p9k_widget_$widget]='_p9k_widget '${(q)widget}' "$@"'
+ if (( ! $+functions[_p9k_widget_$widget] )); then
+ functions[_p9k_widget_$widget]='_p9k_widget '${(q)widget}' "$@"'
+ fi
# The leading dot is to work around bugs in zsh-syntax-highlighting.
zle -A $widget ._p9k_orig_$widget
zle -N $widget _p9k_widget_$widget