-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Truecolors not working inside tmux #3668
Comments
I'm having the same problem, as mentioned in #3362 |
Just for the record I have |
I think I have the exact same problem... A weird-ish yellow background for both additions and deletions when inside Tmux > lazygit. The regular git-delta diff colors work when lazygit runs outside of Tmux. Or when just using git diff (using delta) inside of Tmux. Somehow that 3rd layer (Tmux > lazygit > delta) messes up the background colors from my theme. |
I don't know why I didn't think of this until now, but the solution I've found is to alias lazygit to use alias lazygit='env TERM=screen-256color lazygit'
alias lg='lazygit' |
Thanks for the workaround 😁 I guess that also sheds some more light on the underlying issue. Inside of Tmux Delta works fine when run standalone inside of Tmux. At least when also setting a set-option -ga terminal-overrides ",*-256color:Tc" What could be going on inside of lazygit here that messes with this? |
I don't know if |
It seems this was introduced by ad0394a because of gdamore/tcell@216e30a removing |
Following, as I'm running into exact same issue. Colors output correctly outside of TMUX, Truecolor working flawlessly for everything else except lazygit with delta for pager. Delta on it's own in TMUX outputs as anticipated. TERM = xterm-kitty in my instance. |
Can you test this again with current master? I don't understand the problem well enough to tell for sure, but I have the suspicion that it might be fixed by #4166 which was merged today. |
I built from last commit and can confirm that it is working now, thank you @stefanhaller! |
Describe the bug
This is driving me nuts, I can't really find someone else mention this problem. Inside tmux lazygit colors are looking like this:
What is interesting is that if I enter neovim (in tmux as well) and launch lazygit from its terminal colors are fine:
It works OK if i set
screen-256color
in tmux, but then I can't have italics and underlines in SSH. I am using kitty terminal, but tested with wezterm and alacritty and the result is the same. Also when diffing outside lazygit with delta colors are fine. Here are relevant configs:tmux
:delta
:lazygit
:To Reproduce
Steps to reproduce the behavior:
Expected behavior
Colors should be fine inside tmux
Screenshots
![image](https://private-user-images.githubusercontent.com/22788016/340051676-df1ac3cb-af22-41ba-9143-58788e0a6c9f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwOTA0NTMsIm5iZiI6MTczOTA5MDE1MywicGF0aCI6Ii8yMjc4ODAxNi8zNDAwNTE2NzYtZGYxYWMzY2ItYWYyMi00MWJhLTkxNDMtNTg3ODhlMGE2YzlmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA5VDA4MzU1M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWFlNzg4YTg5Y2I3NWFmOWRhMWY1YWZkOGRkOTQwNTY3ZWU4ZmEwMjY0MjNkMDExNTU3ZGM4ODNjMDlmMDE3YTUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.6IO7XuL209sARki5JHICLSDWeKuACY-hGT52mEwJlx4)
Truecolors are working fine inside my terminal:
Version info:
commit=v0.42.0, build date=2024-05-19T10:54:29Z, build source=binaryRelease, version=0.42.0, os=linux, arch=amd64, git version=2.45.2
The text was updated successfully, but these errors were encountered: