From 40bb2e78046f715eac8ff4a0f5a60ad4513cd1b0 Mon Sep 17 00:00:00 2001 From: Eric Freese Date: Thu, 26 Jan 2017 17:00:56 -0700 Subject: [PATCH] little cleanup --- src/async.zsh | 3 +-- zsh-autosuggestions.zsh | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/async.zsh b/src/async.zsh index eadd9c7..3e61a0b 100644 --- a/src/async.zsh +++ b/src/async.zsh @@ -65,14 +65,13 @@ _zsh_autosuggest_async_recreate_pty() { # Start a new pty running the server function zpty -b $ZSH_AUTOSUGGEST_PTY_NAME "_zsh_autosuggest_async_suggestion_server _zsh_autosuggest_strategy_$ZSH_AUTOSUGGEST_STRATEGY" - # Store the fd so we can destroy this pty later + # Store the fd so we can remove the handler later if (( REPLY )); then _ZSH_AUTOSUGGEST_PTY_FD=$REPLY else _ZSH_AUTOSUGGEST_PTY_FD=$zptyfd fi - # Set up input handler from the pty zle -F $_ZSH_AUTOSUGGEST_PTY_FD _zsh_autosuggest_async_suggestion_ready } diff --git a/zsh-autosuggestions.zsh b/zsh-autosuggestions.zsh index 64bfd34..d6b6377 100644 --- a/zsh-autosuggestions.zsh +++ b/zsh-autosuggestions.zsh @@ -579,14 +579,13 @@ _zsh_autosuggest_async_recreate_pty() { # Start a new pty running the server function zpty -b $ZSH_AUTOSUGGEST_PTY_NAME "_zsh_autosuggest_async_suggestion_server _zsh_autosuggest_strategy_$ZSH_AUTOSUGGEST_STRATEGY" - # Store the fd so we can destroy this pty later + # Store the fd so we can remove the handler later if (( REPLY )); then _ZSH_AUTOSUGGEST_PTY_FD=$REPLY else _ZSH_AUTOSUGGEST_PTY_FD=$zptyfd fi - # Set up input handler from the pty zle -F $_ZSH_AUTOSUGGEST_PTY_FD _zsh_autosuggest_async_suggestion_ready }