fzf-tab
fzf-tab copied to clipboard
[BUG]my fzf result display anomaly
Describe the bug

When I input any command and then press the tab key, several additional lines are displayed.
I can make sure:
- [x] I am using the latest version of fzf-tab
- [x] this is the minimal zshrc which can reproduce this bug
- [x] fzf-tab is loaded after
compinit
- [x] fzf-tab is loaded after plugins which will wrap Tab, like junegunn/fzf/completion.zsh
- [x] fzf-tab is loaded before zsh-autosuggestions, zsh-syntax-highlighting and fast-syntax-highlighting.
Environment:
- OS: macOS 13.3
- zsh version: 5.9 (x86_64-apple-darwin22.0)
- zinit version: v3.10.0 (darwin22.0_x86_64)
Minimal zshrc
# 应用bash文件里面的配置
source ~/.bash_profile
# 应用spaceship的配置
source ~/.spaceship-prompt
# 应用zinit
source "$HOME/.local/share/zinit/zinit.git/zinit.zsh"
autoload -Uz _zinit
(( ${+_comps} )) && _comps[zinit]=_zinit
# 配置
# 修复zsh缺省的问题:https://blog.csdn.net/qq_36148847/article/details/79260745
setopt no_nomatch
# 主题
zinit light spaceship-prompt/spaceship-prompt
# 加载 OMZ 框架及部分插件
zinit snippet OMZ::lib/completion.zsh
zinit snippet OMZ::lib/history.zsh
# OMZgit辅助
zinit light aeons/omz-git
# fzf,必须在autosuggestions和highlighting之前加载
zpcompinit; zpcdreplay #必须加这一行,否则fzf-tab按下tab后会报错
zinit light Aloxaf/fzf-tab
# 自动补全
zinit light zsh-users/zsh-autosuggestions
# 语法高亮
zinit light zdharma-continuum/fast-syntax-highlighting
# 查找历史,务必放在高亮后面
zinit light zsh-users/zsh-history-substring-search
# 历史记录
zinit load zdharma-continuum/history-search-multi-word
# z
zinit ice lucid wait='0'
zinit light agkozak/zsh-z
# ls高亮
zinit light zpm-zsh/ls
# 绑定历史记录快捷键
bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down
### Added by Zinit's installer
if [[ ! -f $HOME/.local/share/zinit/zinit.git/zinit.zsh ]]; then
print -P "%F{33} %F{220}Installing %F{33}ZDHARMA-CONTINUUM%F{220} Initiative Plugin Manager (%F{33}zdharma-continuum/zinit%F{220})…%f"
command mkdir -p "$HOME/.local/share/zinit" && command chmod g-rwX "$HOME/.local/share/zinit"
command git clone https://github.com/zdharma-continuum/zinit "$HOME/.local/share/zinit/zinit.git" && \
print -P "%F{33} %F{34}Installation successful.%f%b" || \
print -P "%F{160} The clone has failed.%f%b"
fi
Plesae trigger completion with Ctrl+X .
and provide the log
Finally, I resolved this bug. The issue was caused by a setting in iTerm2 that I had enabled.
iTerm2
-> Settings...
-> Profiles
-> Text
-> Unicode
-> Ambiguous characters are double-width
.
After disabling this setting, the display returned to normal.