From 5217ed52697157f5ccc961d9b6b1c7967abc418b Mon Sep 17 00:00:00 2001 From: Eric Freese Date: Sun, 15 Dec 2019 06:49:50 -0700 Subject: [PATCH] cleanup: Switch to arithmetic comparison --- src/widgets.zsh | 2 +- zsh-autosuggestions.zsh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/widgets.zsh b/src/widgets.zsh index 9d92816..164c751 100644 --- a/src/widgets.zsh +++ b/src/widgets.zsh @@ -128,7 +128,7 @@ _zsh_autosuggest_accept() { fi # Only accept if the cursor is at the end of the buffer - if [[ $CURSOR = $max_cursor_pos ]]; then + if (( $CURSOR == $max_cursor_pos )); then # Add the suggestion to the buffer BUFFER="$BUFFER$POSTDISPLAY" diff --git a/zsh-autosuggestions.zsh b/zsh-autosuggestions.zsh index 84be34a..ffd5533 100644 --- a/zsh-autosuggestions.zsh +++ b/zsh-autosuggestions.zsh @@ -390,7 +390,7 @@ _zsh_autosuggest_accept() { fi # Only accept if the cursor is at the end of the buffer - if [[ $CURSOR = $max_cursor_pos ]]; then + if (( $CURSOR == $max_cursor_pos )); then # Add the suggestion to the buffer BUFFER="$BUFFER$POSTDISPLAY"