Open jackTabsCode opened 8 months ago
Looks like an escape sequence representing cursor movement 🤔
Looks like an escape sequence representing cursor movement 🤔
Interesting. I don't know much about this kind of stuff. I edited the issue title.
I'm seeing the same and was about to open a new issue when I found this one.
To reproduce:
git log -n 5 --pretty=format:'%C(red)%h' --date=short
:c8c8/cccc/d4d4^G^[]11;rgb:3b3b/4141/4d4d^G
) and after the command runs (10;rgb:c8c8/cccc/d4d411;rgb:3b3b/4141/4d4d
). They look like some form of color information or escape sequences.Observed:
Expected (and what Alacritty shows):
Zed info:
Zed: v0.130.2 (Zed Preview)
OS: macOS 14.4.1
Memory: 64 GiB
Architecture: aarch64
Here's another repro, running gh repo view
:
Same problem occurred. Even not showing git diff.
❯ git diff
❯ 10;rgb:c8c8/cccc/d4d4
❯ 11;rgb:3b3b/4141/4d4d
For anyone having these symptoms and having delta
installed for git diff browsing, https://github.com/zed-industries/zed/issues/13418#issuecomment-2185000070 might help.
Relevant delta issue: https://github.com/dandavison/delta/issues/1707
For anyone having these symptoms and having
delta
installed for git diff browsing, #13418 (comment) might help. Relevant delta issue: dandavison/delta#1707
This didn't help me, unfortunately, but completely removing delta
from my .gitconfig
did help. 🤷 So, definitely seems like a problem related to using delta
. 👍 Thanks for pointing to this out, @SomeoneToIgnore ⚡
EDIT: ohh, actually what helped was adding --dark
and removing export GIT_PAGER=delta
from my .bashrc
. 🎉
For anyone having these symptoms and having
delta
installed for git diff browsing, #13418 (comment) might help. Relevant delta issue: dandavison/delta#1707
Thanks! It works for me!
Do these fixes suggested only apply to git diff
?
I'm confused on why this is happening. I don't know a lot about terminal emulators. How is it possible that something can put text in the input field? And why would it be a color code?
Do these fixes suggested only apply to
git diff
?I'm confused on why this is happening. I don't know a lot about terminal emulators. How is it possible that something can put text in the input field? And why would it be a color code?
No, seems to be happenin with other CLI tools (e.g., #9742)
For me this happens with lefthook. Especially annoying on its pre-commit
hook because I have nvim as my git editor.
Hi, author of terminal-colorsaurus (the library that delta uses for color detection) here 👋🏼
The 10;rgb:c8c8/cccc/d4d4
11;rgb:3b3b/4141/4d4d
output is caused by delta trying to detect the terminal's foreground and background color. To do this it uses terminal-colorsaurus
.
The output appears because terminal-colorsaurus
thinks that zed doesn't support these sequences. It uses a neat trick to detect support. This trick relies on the fact that terminals usually answer to different queries in the order that they arrived.
Zed however replies to color queries out of order.
For example when sending OSC 11 ; ? ST
(bg color query) followed by CSI c
(request device attributes) the response to CSI c
arrives first:
$ printf '\e]11;?\e\\ \e[c' && cat -v
^[[?6c^[]11;rgb:dcdc/dcdc/dddd^[\^C
(edit: my printf was incorrect, but my conclusion was nevertheless correct ^^)
delta user, and use delta as git diff tool.
I got this too.
]10;rgb:c8c8/cccc/d4d4
11;rgb:3b3b/4141/4d4d
This is also happening for me on repos that use lefthook.
Fingers crossed for https://github.com/zed-industries/zed/issues/15105#issuecomment-2308404573 to be true.
I also was able to fix it by just updating Lefthook, so it must be some weird combination of two issues?
for me its fix in v0.151.0-pre
FWIW I no longer seem to be experiencing this issue, I also think the fix might have been two-fold, both a Zed update and a Lefthook update.
I'm still experiencing this issue, but not with Lefthook. I just had it happen the other day, but I can't remember what program it was. I'll report back once I find out
Check for existing issues
Describe the bug / provide steps to reproduce it
I'm having an issue with some commands where, what I believe to be are color codes are being spat into the output. This issue is not occurring with the built in Terminal.
I'm not 100% sure if this is due to Zed so I think this might need some further investigation, but I'm assuming it might be because of it being a non issue with other terminals?
Environment
Zed: v0.124.6 (Zed Preview) OS: macOS 14.3.1 Memory: 32 GiB Architecture: aarch64
If applicable, add mockups / screenshots to help explain present your vision of the feature
If applicable, attach your
~/Library/Logs/Zed/Zed.log
file to this issue.If you only need the most recent lines, you can run the
zed: open log
command palette action to see the last 1000.No response