Skip to content

Commit

Permalink
Reset opts in some functions affected by GLOB_SUBST
Browse files Browse the repository at this point in the history
Should fix GitHub #334
  • Loading branch information
ericfreese committed Jul 14, 2018
1 parent b8bf86f commit 681ffc7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/bind.zsh
Expand Up @@ -74,7 +74,9 @@ _zsh_autosuggest_bind_widget() {

# Map all configured widgets to the right autosuggest widgets
_zsh_autosuggest_bind_widgets() {
local widget
emulate -L zsh

local widget
local ignore_widgets

ignore_widgets=(
Expand Down
4 changes: 4 additions & 0 deletions src/widgets.zsh
Expand Up @@ -37,6 +37,8 @@ _zsh_autosuggest_clear() {

# Modify the buffer and get a new suggestion
_zsh_autosuggest_modify() {
emulate -L zsh

local -i retval

# Only available in zsh >= 5.4
Expand Down Expand Up @@ -104,6 +106,8 @@ _zsh_autosuggest_fetch() {

# Offer a suggestion
_zsh_autosuggest_suggest() {
emulate -L zsh

local suggestion="$1"

if [[ -n "$suggestion" ]] && (( $#BUFFER )); then
Expand Down
8 changes: 7 additions & 1 deletion zsh-autosuggestions.zsh
Expand Up @@ -184,7 +184,9 @@ _zsh_autosuggest_bind_widget() {

# Map all configured widgets to the right autosuggest widgets
_zsh_autosuggest_bind_widgets() {
local widget
emulate -L zsh

local widget
local ignore_widgets

ignore_widgets=(
Expand Down Expand Up @@ -291,6 +293,8 @@ _zsh_autosuggest_clear() {

# Modify the buffer and get a new suggestion
_zsh_autosuggest_modify() {
emulate -L zsh

local -i retval

# Only available in zsh >= 5.4
Expand Down Expand Up @@ -358,6 +362,8 @@ _zsh_autosuggest_fetch() {

# Offer a suggestion
_zsh_autosuggest_suggest() {
emulate -L zsh

local suggestion="$1"

if [[ -n "$suggestion" ]] && (( $#BUFFER )); then
Expand Down

0 comments on commit 681ffc7

Please sign in to comment.