zsh-vi-mode: Broken zsh completion menu

General information

  • Operating system: Pop!_OS 21.04
  • ZSH framework: none
  • ZSH version: 5.8-6
  • ZVM version: 82f00eaefc95165f4524e77312db0d216a64a7ad

Basic examination

  • I have read through the README page
  • I have the latest version of zsh-vi-mode
  • I have tested with another terminal program: kitty, gnome-terminal, tilix

Problem description

On the latest commit (82f00eaefc95165f4524e77312db0d216a64a7ad) zsh completion menu broke inside tmux. Outside of tmux it works.

Reproduction steps

  1. setopt menu_complete
  2. enter tmux, print any command (cd for example) and press Tab

https://user-images.githubusercontent.com/13056013/132378718-6d132039-9cb8-44d2-9c8f-07c9c80c0f4d.mov

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 4
  • Comments: 17 (12 by maintainers)

Commits related to this issue

Most upvoted comments

Hi @anuvyklack @StefanBoca

Thanks for your patience, now this issue has been addressed and fixed. Please update your plugin to the latest version and try again.

Thanks and Regards

I am also running into this issue. My environment is structurally the same as @weirongxu 's MacOS setup. Thank you so much for the workaround. Commenting out the zle redisplay fixes it for me. I’m leaving a comment just so you can gauge the impact and priority for this fix. Also, I’d hate to miss out on future updates because I’m no longer tracking upstream. Thanks so much for all your hard work on this plugin!

Hi @anuvyklack

For the temporary solution, you can comment the line L3152 to disable redisplay as below:

 if [[ -n $TMUX ]]; then
    zvm_update_cursor
    # Fix display is not updated in the terminal of IntelliJ IDE.
    # We should update display only when the last widget isn't a
    # completion widget
    #
    # PLEASE COMMENT BELOW LINE
    #
    # [[ $LASTWIDGET =~ 'complet' ]] || zle redisplay
 fi

Thanks & Regards

Same problem here. My environment:

General information

Linux

  • Operating system: Linux 5.9.16-1-MANJARO x86_64
  • ZSH framework: none
  • ZSH version: 5.8 (x86_64-pc-linux-gnu)
  • ZVM version: 7878372
  • TMUX version: 3.2a
  • Terminal emulator: wezterm 20220101-133340-7edc5b5a

MacOS

  • Operating system: Darwin 20.6.0 x86_64
  • ZSH framework: none
  • ZSH version: 5.8.1 (x86_64-apple-darwin20.6.0)
  • ZVM version: 7878372
  • TMUX version: 3.2a
  • Terminal emulator: iTerm2 Build 3.4.15

Reproduction steps

  1. ~/.zshrc
    autoload -U +X compinit && compinit
    zstyle ':completion:*' menu yes select
    source /Users/raidou/repos/zsh-vi-mode/zsh-vi-mode.zsh
    
  2. enter tmux
  3. input ls and press tab more than twice

@jeffreytse My minimal .zshrc is

export ZSH="/home/user/.oh-my-zsh"
plugins=(zsh-vi-mode)
source $ZSH/oh-my-zsh.sh

If I load the plugin directly without loading Oh My Zsh, though, the problem disappears:

export ZSH="/home/user/.oh-my-zsh"
source $ZSH/custom/plugins/zsh-vi-mode/zsh-vi-mode.plugin.zsh