You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 24, 2020. It is now read-only.
What is happening? leftPromptWidth is calculating the incorrect length. There is extra padding on the right prompt for a few seconds and then it disappears and the cursor is in the wrong place. This also happens during tab completion
Notice the command doubling...
Have you tried to debug or fix it?
Not yet.
Environment Information
This information will help us understand your configuration.
What version of ZSH are you using? You can use zsh --version to see this.
zsh 5.7.1 (x86_64-apple-darwin18.2.0)
Do you use a ZSH framework (e.g., Oh-My-ZSH, Antigen)?
No
How did you install P9k (cloning the repo, by tarball, a package from your OS, etc.,)?
cloning
What version of P9k are you using?
Next
Which terminal emulator do you use?
iTerm 2
The text was updated successfully, but these errors were encountered:
leftPromptWidth is calculating the incorrect length.
I think leftPromptWidth doesn't affect single-line prompt. It also shouldn't break cursor positioning even if it returns incorrect value. The position of right prompt and subsequent cursor movement is done by zsh based on the values of PROMPT and RPROMPT (and a few other things like ZLE_RPROMPT_INDENT, locale and multibyte).
You can use the following command to diagnose this problem.
() {
emulate -L zsh
setopt err_return no_unset
local text
print -rl -- 'Select a part of your prompt from the terminal window and paste it below.'''read -r '?Prompt: ' text
local -i len=${(m)#text}local frame="+-${(pl.$len..-.):-}-+"
print -lr -- $frame"| $text |"$frame
}
If the output of the command is aligned for every part of your prompt (left and right), this indicates a bug in the theme. Use this command to diagnose it:
print -rl -- ${(eq+)PROMPT}${(eq+)RPROMPT}
Look for %{...%} and backslash escapes in the output. If there are any, they are the likely culprits.
This is usually caused by a terminal bug or misconfiguration that makes it print ambiguous-width characters as double-width instead of single width. For example, this issue.
If the prompt line is shorter than the frame and is mangled
This can be caused by misconfigured locale. See this issue.
Since you have two different prompts (one succeeding the other with a short delay) that get positioned differently, you might have to run these tests on both.
Tip: Once you find a part of your prompt that causes misaligned output, it's a good idea to reduce it to the minimum. Ideally, to a single character.
If you decide to debug your problem, please post the outcome of your attempt (and new methods, should you devise any). Debugging such issues when they are reported by users is very time consuming. It helps to accumulate and pool experience to save time in the future.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe Your Issue
What is happening?
leftPromptWidth
is calculating the incorrect length. There is extra padding on the right prompt for a few seconds and then it disappears and the cursor is in the wrong place. This also happens during tab completionNotice the command doubling...
Have you tried to debug or fix it?
Not yet.
Environment Information
This information will help us understand your configuration.
What version of ZSH are you using? You can use
zsh --version
to see this.zsh 5.7.1 (x86_64-apple-darwin18.2.0)
Do you use a ZSH framework (e.g., Oh-My-ZSH, Antigen)?
No
How did you install P9k (cloning the repo, by tarball, a package from your OS, etc.,)?
cloning
What version of P9k are you using?
Next
Which terminal emulator do you use?
iTerm 2
The text was updated successfully, but these errors were encountered: