瀏覽代碼

cleanup: Switch to arithmetic comparison

pull/488/head
Eric Freese 4 年之前
父節點
當前提交
5217ed5269
共有 2 個檔案被更改,包括 2 行新增2 行删除
  1. +1
    -1
      src/widgets.zsh
  2. +1
    -1
      zsh-autosuggestions.zsh

+ 1
- 1
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"

+ 1
- 1
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"

Loading…
取消
儲存