Ver código fonte

Do not leak global variables REPLY and strategy

https://github.com/zsh-users/zsh-autosuggestions/issues/341
pull/344/merge
Martin Väth 6 anos atrás
committed by Eric Freese
pai
commit
43a011026f
3 arquivos alterados com 4 adições e 2 exclusões
  1. +1
    -0
      src/fetch.zsh
  2. +1
    -1
      src/strategies/completion.zsh
  3. +2
    -1
      zsh-autosuggestions.zsh

+ 1
- 0
src/fetch.zsh Ver arquivo

@ -9,6 +9,7 @@
_zsh_autosuggest_fetch_suggestion() {
typeset -g suggestion
local -a strategies
local strategy
# Ensure we are working with an array
strategies=(${=ZSH_AUTOSUGGEST_STRATEGY})

+ 1
- 1
src/strategies/completion.zsh Ver arquivo

@ -88,7 +88,7 @@ _zsh_autosuggest_capture_buffer() {
_zsh_autosuggest_capture_completion() {
typeset -g completion
local line
local line REPLY
# Zle will be inactive if we are in async mode
if zle; then

+ 2
- 1
zsh-autosuggestions.zsh Ver arquivo

@ -587,7 +587,7 @@ _zsh_autosuggest_capture_buffer() {
_zsh_autosuggest_capture_completion() {
typeset -g completion
local line
local line REPLY
# Zle will be inactive if we are in async mode
if zle; then
@ -716,6 +716,7 @@ _zsh_autosuggest_strategy_match_prev_cmd() {
_zsh_autosuggest_fetch_suggestion() {
typeset -g suggestion
local -a strategies
local strategy
# Ensure we are working with an array
strategies=(${=ZSH_AUTOSUGGEST_STRATEGY})

Carregando…
Cancelar
Salvar