summaryrefslogtreecommitdiff
path: root/internal/p10k.zsh
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2020-01-09 01:00:00 +0300
committerromkatv <roman.perepelitsa@gmail.com>2020-01-09 01:00:00 +0300
commited78375a2eb6c180d004655d9789791a8c1b8354 (patch)
treeb994a4b35b6b6e5a1dbbba400d6fa5d3f1dbcbd9 /internal/p10k.zsh
parent1173119d554fa3e8a7442a344caa844be39d18b9 (diff)
work around bugs in zsh-syntax-highlighting
Diffstat (limited to 'internal/p10k.zsh')
-rw-r--r--internal/p10k.zsh5
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index c589dd84..e81011e8 100644
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -5327,7 +5327,7 @@ function _p9k_widget_hook() {
}
function _p9k_widget() {
- (( ! ${+widgets[_p9k_orig_$1]} )) || zle _p9k_orig_$1 "${@:2}"
+ (( ! ${+widgets[._p9k_orig_$1]} )) || zle ._p9k_orig_$1 "${@:2}"
local res=$?
(( ! __p9k_enabled )) || _p9k_widget_hook "$@"
return res
@@ -5348,7 +5348,8 @@ function _p9k_wrap_widgets() {
local widget
for widget in ${(u)${${(f)"$(<$tmp)"}##* }:#(*\"|.*)}; do
functions[_p9k_widget_$widget]='_p9k_widget '${(q)widget}' "$@"'
- zle -A $widget _p9k_orig_$widget
+ # The leading dot is to work around bugs in zsh-syntax-highlighting.
+ zle -A $widget ._p9k_orig_$widget
zle -N $widget _p9k_widget_$widget
done 2>/dev/null # `zle -A` fails for inexisting widgets and complains to stderr
} always {