wrapping: Don't add '--' when invoking widgets.
It's the widget's caller's responsibility, not ours, to add '--' where due. If we do it, two instances of '--' might result. (I haven't been able to provoke this problem.) If this commit causes problems, the cause would be widget-callers that don't pass '--' although they should.
This commit is contained in:
		
							parent
							
								
									7e6d960a08
								
							
						
					
					
						commit
						c808d2187a
					
				|  | @ -205,16 +205,16 @@ _zsh_highlight_bind_widgets() | |||
| 
 | ||||
|       # User defined widget: override and rebind old one with prefix "orig-". | ||||
|       user:*) eval "zle -N orig-$cur_widget ${widgets[$cur_widget]#*:}; \ | ||||
|                     _zsh_highlight_widget_$cur_widget() { _zsh_highlight_call_widget orig-$cur_widget -- \"\$@\" }; \ | ||||
|                     _zsh_highlight_widget_$cur_widget() { _zsh_highlight_call_widget orig-$cur_widget \"\$@\" }; \ | ||||
|                     zle -N $cur_widget _zsh_highlight_widget_$cur_widget";; | ||||
| 
 | ||||
|       # Completion widget: override and rebind old one with prefix "orig-". | ||||
|       completion:*) eval "zle -C orig-$cur_widget ${${widgets[$cur_widget]#*:}/:/ }; \ | ||||
|                           _zsh_highlight_widget_$cur_widget() { _zsh_highlight_call_widget orig-$cur_widget -- \"\$@\" }; \ | ||||
|                           _zsh_highlight_widget_$cur_widget() { _zsh_highlight_call_widget orig-$cur_widget \"\$@\" }; \ | ||||
|                           zle -N $cur_widget _zsh_highlight_widget_$cur_widget";; | ||||
| 
 | ||||
|       # Builtin widget: override and make it call the builtin ".widget". | ||||
|       builtin) eval "_zsh_highlight_widget_$cur_widget() { _zsh_highlight_call_widget .$cur_widget -- \"\$@\" }; \ | ||||
|       builtin) eval "_zsh_highlight_widget_$cur_widget() { _zsh_highlight_call_widget .$cur_widget \"\$@\" }; \ | ||||
|                      zle -N $cur_widget _zsh_highlight_widget_$cur_widget";; | ||||
| 
 | ||||
|       # Default: unhandled case. | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue