Closed life404 closed 4 years ago
Have you followed https://github.com/romkatv/powerlevel10k/blob/master/README.md#why-is-my-cursor-in-the-wrong-place? What are the results?
The echo '\u276F'
looks normal.
Then, I add unset ZLE_RPROMPT_INDENT
at the bottom of ~/.zshrc
, still have problem.
The diagnose command give the following results.
Then, I input the command print -rl -- ${(eq+)PROMPT} ${(eq+)RPROMPT}
, but the terminal throw the error zsh: error in flags
,I don't know what it means of error in flags
And I found the theme display normally in screen
, so, I suspect it will be a configuration problem with tmux.
Then, I input the command
print -rl -- ${(eq+)PROMPT} ${(eq+)RPROMPT}
, but the terminal throw the errorzsh: error in flags
,I don't know what it means oferror in flags
This likely means you are using a very old version of zsh. Type echo $ZSH_VERSION
to confirm.
It's a very good idea to use a newer version.
I update my zsh from 5.1.1 to 5.7.1, and input the command print -rl -- ${(eq+)PROMPT} ${(eq+)RPROMPT}
again.
I can't understand the output, and can't find %{...%}
or backslash escapes.
The error is gone. This is good.
I didn't think the issues with cursor positioning were caused by the old zsh version. Sorry for the confusion. I suggested to upgrade because it's a good idea in general.
Since the standard diagnostic procedure hasn't helped, your issue isn't the same as any of the previous users had. At this point you have much more information than I to debug this. I would suggest commenting out parts of your ~/.zshrc
one by one to see when the problem goes away. The first thing to try is to disable powerlevel10k. If this doesn't fix the cursor positioning, there is little chance I'll be able to help.
Thank you very much for your advice. I will try as you suggest.
I will try as you suggest.
Any luck?
Sorry, I forgot to reply immediately. The problem have been solved, after I restarted my server. But in the end, I don't know what caused the problem. The problem may be a special case of my.
Thanks for the update.
In macOS, the Powerlevel10k looks perform well, and can displayed normally tmux. However, after I copy my config to Ubuntu, the cursor cannot be displayed normally in tmux.
In Mac iTerm2 In Mac tmux(tmux =3.0a) In Ubuntu 16.04.5, The cursor display was also normal. However, when I open the tmux, the cursor had some problem
my config as follow
However, I found a intersting thing, when I exit VIM, the cursor in the previous line will display normally, but there is still a problem with the current line.