Powerlevel9k / powerlevel9k

Powerlevel9k was a tool for building a beautiful and highly functional CLI, customized for you. P9k had a substantial impact on CLI UX, and its legacy is now continued by P10k.
https://github.com/romkatv/powerlevel10k
MIT License
13.46k stars 948 forks source link

Fix completion menu #1268

Closed dritter closed 5 years ago

dritter commented 5 years ago

This fixes #1267 .

The problem was that we move the cursor around to place the right hand prompt. So the fix is to move the cursor back up in the right completion menu.

Syphdias commented 5 years ago

I can still reproduce the described bug like this. Remember to shrink your terminal to 20-30 lines in height. Also I think your changes are not even run in the case described by the issue.

docker run -e LANG=C.UTF-8 -e LC_ALL=C.UTF-8 -e TERM=$TERM -it --rm ubuntu bash -uexc '
  cd
  apt update && apt install -y zsh git vim
  git clone https://github.com/dritter/powerlevel9k.git -b fix_completion_menu
  echo "
    zstyle :completion:\* menu yes select
    autoload -Uz compinit && compinit
    P9K_PROMPT_ON_NEWLINE=true
    P9K_RPROMPT_ON_NEWLINE=false
    source ~/powerlevel9k/powerlevel9k.zsh-theme" >~/.zshrc
  exec zsh'
dritter commented 5 years ago

Ha! You are right. I tricked myself by setting P9K_RPROMPT_ON_NEWLINE=true accidentally. 🙄