From 5a3b584fd19025998eeb692dc94cdb93fdb3dfc2 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Thu, 23 Jul 2015 12:57:15 +0000 Subject: [PATCH 1/2] zsh 5.0.9 compatibility: Don't wrap the new 'bracketed-paste' widget. This is required to support highlighting of the pasted region, such as zle_highlight+=( paste:... ) . The underlying problem might be related to the one explained in workers/35870. --- zsh-syntax-highlighting.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zsh-syntax-highlighting.zsh b/zsh-syntax-highlighting.zsh index 937e426..af0bcde 100644 --- a/zsh-syntax-highlighting.zsh +++ b/zsh-syntax-highlighting.zsh @@ -139,7 +139,7 @@ _zsh_highlight_bind_widgets() # Override ZLE widgets to make them invoke _zsh_highlight. local cur_widget - for cur_widget in ${${(f)"$(builtin zle -la)"}:#(.*|_*|orig-*|run-help|which-command|beep|yank*)}; do + for cur_widget in ${${(f)"$(builtin zle -la)"}:#(.*|_*|orig-*|run-help|bracketed-paste|which-command|beep|yank*)}; do case $widgets[$cur_widget] in # Already rebound event: do nothing. From 5d4134dbda0c7220c6cf8c6f55d2d65a53cf6b30 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Thu, 23 Jul 2015 16:36:50 +0000 Subject: [PATCH 2/2] Follow-up to previous: fix 'paste' highlight after put in vi-mode. Suggested-by: Oliver Kiddle --- zsh-syntax-highlighting.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zsh-syntax-highlighting.zsh b/zsh-syntax-highlighting.zsh index af0bcde..54b1e0e 100644 --- a/zsh-syntax-highlighting.zsh +++ b/zsh-syntax-highlighting.zsh @@ -139,7 +139,7 @@ _zsh_highlight_bind_widgets() # Override ZLE widgets to make them invoke _zsh_highlight. local cur_widget - for cur_widget in ${${(f)"$(builtin zle -la)"}:#(.*|_*|orig-*|run-help|bracketed-paste|which-command|beep|yank*)}; do + for cur_widget in ${${(f)"$(builtin zle -la)"}:#(.*|_*|orig-*|run-help|bracketed-paste|vi-put-before|vi-put-after|which-command|beep|yank*)}; do case $widgets[$cur_widget] in # Already rebound event: do nothing.