Closed mrincredibleu closed 2 years ago
This is almost certainly caused by a bug in one of the plugins you are using. Try disabling all of them except for powerlevel10k. If the error goes away, try to pinpoint which plugin causes issues.
zdharma/fast-syntax-highlighting appears to be the culprit. I've tested for a while and could not reproduce this issue with that plugin disabled. That plugin does not appear to be maintained any longer, I do however really like it since there don't seem to exist any other similarly good syntax highlighting plugins for zsh.
Do you know any alternative plugins or would it be possible to disable the output of _p9k_deschedule_redraw at least for this plugin?
The error is no joke. It's a serious bug that shouldn't be masked. This error says that another plugin has closed a file descriptor it didn't own. A rogue plugin like that can cause serious havoc.
If you really want to suppress this error message, you'll have to fork powerlevel10k and edit its source code. Alternatively, you can hot-patch code at runtime. I don't recommend this!
The only alternative to zdharma/fast-syntax-highlighting is zsh-users/zsh-syntax-highlighting.
I see, I'll consider switching back to zsh-users/zsh-syntax-highlighting then since the problem probably won't be fixed anymore in zdharma/fast-syntax-highlighting. Thanks for providing some info on this!
I fixed this issue by loading syntax highlighting as the last plugin.
Occasionally in the middle of typing on the command line this is printed by _p9k_deschedule_redraw and a new prompt is generated below:
This usually happens within tmux after the pane running zsh has been resized a lot (with the mouse in my testing) when there is a prompt with git widgets. It has no other functional sideeffects as far as I can discern.
This shows a backlog of it happening. The reprinted prompts and commands are caused by the resizing of the tmux pane. I really don't know what to type to trigger the messages so I've repeatedly typed random things at the prompt deleted them with ^U and typed again until the messages were printed.
Here is another example:
It appears to happen when there is the following lazy buildup of the prompt widgets at the beginning of the backlog.
From my standpoint an acceptable solution would be to disable any output for the commands in question inside of _p9k_deschedule_redraw in internal/p10k.zsh as there are no other discernible side effects other than that a new prompt is generated because of the output.
The .zshrc I used for testing: