sindresorhus / pure

Pretty, minimal and fast ZSH prompt
MIT License
13.22k stars 978 forks source link

Pressing 'o' in vim-mode causes prompt to clobber previous line #576

Closed MatrixManAtYrService closed 4 years ago

MatrixManAtYrService commented 4 years ago

General information

System report (output of prompt_pure_system_report):

- Zsh: zsh 5.7.1 (x86_64-debian-linux-gnu) (/bin/zsh)
- Operating system: Linux (4.19.0-12-amd64 #1 SMP Debian 4.19.152-1 (2020-10-18) x86_64 GNU/Linux)
- Terminal program: unknown (unknown)
- Tmux: no
- Git: git version 2.20.1
- Pure state:
    - username: `''`
    - prompt: `❯`
    - version: `1.13.0`
- zsh-async version: `1.8.4`
- PROMPT: `typeset -g PROMPT=$'%F{${prompt_pure_colors[path]}}%~%f %F{242}${prompt_pure_vcs_info[branch]}%F{218}${prompt_pure_git_dirty}%f %F{$prompt_pure_colors[execution_time]}${prompt_pure_cmd_exec_time}%f
%}%(12V.%F{$prompt_pure_colors[virtualenv]}%12v%f .)%(?.%F{$prompt_pure_colors[prompt:success]}.%F{$prompt_pure_colors[prompt:error]})${prompt_pure_state[prompt]}%f '`
- Colors: `typeset -g -A prompt_pure_colors=( [execution_time]=yellow [git:action]=yellow [git:arrow]=cyan [git:branch]=242 [git:branch:cached]=red [git:dirty]=218 [git:stash]=cyan [host]=242 [path]=blue [prompt:continuation]=242 [prompt:error]=red [prompt:success]=magenta [user]=242 [user:root]=default [virtualenv]=242 )`
- TERM: `export TERM=alacritty`
- Virtualenv: `export VIRTUAL_ENV_DISABLE_PROMPT=12`
- Conda: `export CONDA_CHANGEPS1=no`
- Detected frameworks: None

Other information

I have:

Every time I insert a new line without submitting the command (in vim mode this is 'o') the prompt moves upwards and clobbers the previous line.

It only happens after I enable the plugin.

Reproduction steps

https://asciinema.org/a/OXxdyKdBtbxtW6Wl5UUTOFBi8?theme=solarized-dark

My .zshrc:

fpath+=$HOME/.zsh/pure
autoload -U promptinit; promptinit
prompt pure
autoload -U promptinit; promptinit
prompt pure

Update: Spooky thing: as soon as wrote this up, it went away. There's clearly some other variable I'm not considering. If it comes back I'll try to discover the secret, then I'll update this issue.