onivim / oni2

Native, lightweight modal code editor
https://v2.onivim.io
MIT License
7.84k stars 282 forks source link

Terminal: problems with zsh pure theme #3659

Open tristil opened 3 years ago

tristil commented 3 years ago

This is a regression from previous behavior seen in most recent build.

When sindresorhus/pure theme is enabled, typing commands is either delayed or commands are not echoed to the screen, depending on which directory you are in.

Scenario 1: If you are in a regular folder and you press a key, it won't echo out until pressing the second key. e.g. to do ls, you press l and there is no output, then you will see ls after pressing s

Scenario 2: If you are in a folder that has a tracked git remote then pressing any key will not echo characters until you press enter. After you press enter the current command line will show ?1h briefly. After the action completes, ?1L is shown in the previously executed command line.

image

Simplified zgen config used to install pure theme:

# load zgen
source "${HOME}/zgen/zgen.zsh"

# check if there's no init script
if ! zgen saved; then
    echo "Creating a zgen save"

    zgen oh-my-zsh

    zgen load mafredri/zsh-async 
    zgen load sindresorhus/pure

    # theme
    zgen oh-my-zsh themes/pure

    # save all to init script
    zgen save
fi
tristil commented 3 years ago

Also happening with dracula and arrow themes

johnridesabike commented 3 years ago

I've noticed similar problems with the Zsh clean theme. Sometimes (but not always) the terminal text will be indented so far to the left it's partially off the screen. Other times, multiple lines will get mangled together. Disabling the theme fixes the problem in Oni2.