Do not leak global variables REPLY and strategy
https://github.com/zsh-users/zsh-autosuggestions/issues/341
This commit is contained in:
		
							parent
							
								
									d7171232c3
								
							
						
					
					
						commit
						3f4c2acd53
					
				|  | @ -587,7 +587,7 @@ _zsh_autosuggest_capture_buffer() { | ||||||
| 
 | 
 | ||||||
| _zsh_autosuggest_capture_completion() { | _zsh_autosuggest_capture_completion() { | ||||||
| 	typeset -g completion | 	typeset -g completion | ||||||
| 	local line | 	local line REPLY | ||||||
| 
 | 
 | ||||||
| 	# Zle will be inactive if we are in async mode | 	# Zle will be inactive if we are in async mode | ||||||
| 	if zle; then | 	if zle; then | ||||||
|  | @ -716,6 +716,7 @@ _zsh_autosuggest_strategy_match_prev_cmd() { | ||||||
| _zsh_autosuggest_fetch_suggestion() { | _zsh_autosuggest_fetch_suggestion() { | ||||||
| 	typeset -g suggestion | 	typeset -g suggestion | ||||||
| 	local -a strategies | 	local -a strategies | ||||||
|  | 	local strategy | ||||||
| 
 | 
 | ||||||
| 	# Ensure we are working with an array | 	# Ensure we are working with an array | ||||||
| 	strategies=(${=ZSH_AUTOSUGGEST_STRATEGY}) | 	strategies=(${=ZSH_AUTOSUGGEST_STRATEGY}) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue