-
-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Under some conditions, when typing next cmd during previous cmd execution, prompt formatting gets mangled #39
Comments
Hello, @AndydeCleyre! Thanks for the report. I have seen something like that myself on occasion, but I have never been able to pinpoint the exact conditions. I'll give your configuration a try. |
Your configuration is great -- I've gotten the problem to occur a couple of times already. I'll get to work on this. |
I only seem to have this problem if I use
in my Reversing the order in which I load the two plugins seems to help slightly; if any garbling occurs, it is corrected when I switch to I'll keep playing around with this. |
Thanks! The FSH interaction was something I only considered while writing this issue, and your corroboration spurred me to try a bisect on FSH. Over here, it looks like the problem started with: commit 08a4ce96953764f03d617f1c52e9a2a3ad6f58c2
Author: Sebastian Gniazdowski <[email protected]>
Date: Sun Feb 23 01:01:14 2020 +0100
plugin.zsh: Use emulate instead of bare setopt
diff --git a/fast-syntax-highlighting.plugin.zsh b/fast-syntax-highlighting.plugin.zsh
index f11177d..4b88d3f 100644
--- a/fast-syntax-highlighting.plugin.zsh
+++ b/fast-syntax-highlighting.plugin.zsh
@@ -72,7 +72,9 @@ _zsh_highlight()
return $ret
fi
- setopt localoptions warncreateglobal noksharrays noshwordsplit extendedglob typesetsilent nokshglob
+ emulate -LR zsh
+ setopt extendedglob warncreateglobal typesetsilent noshortloops
+
local REPLY # don't leak $REPLY into global scope
local -a reply |
So I checked output of --- BEFORE.txt 2022-04-04 22:25:12.080597430 -0400
+++ AFTER.txt 2022-04-04 22:26:08.085803758 -0400
@@ -1,22 +1,13 @@
-alwaystoend
-autopushd
-nocaseglob
-completeinword
extendedglob
-noflowcontrol
-globdots
-histignorealldups
-histignorespace
-histverify
interactive
-interactivecomments
localoptions
+localpatterns
+localtraps
login
monitor
-promptsubst
-pushdignoredups
-sharehistory
shinstdin
+noshortloops
typesetsilent
warncreateglobal
zle |
I'm currently testing with EDIT: Nope, reproduced. |
I haven't seen this since locally reverting zdharma-continuum/fast-syntax-highlighting@08a4ce9. I'll open an issue there linked to this one. |
Fascinating. Thanks for staying on top of this issue, @AndydeCleyre. |
Hello!
Sometimes I begin typing the next command while the previous one is running, and this works, even with this bug. But the prompt display gets temporarily mangled in this event.
This is hard for me to reliably reproduce with a clean setup, and so I'm sorry for such a messy report.
I think that to reproduce we need:
Here's my prompt-related code:
When run within a tmux session, run
sleep 1
, and then keep typing while that finishes:The text was updated successfully, but these errors were encountered: