Render tig correctly #1227

Closed
opened 2026-01-30 22:19:36 +00:00 by claunia · 23 comments
Owner

Originally created by @decriptor on GitHub (May 20, 2019).

Originally assigned to: @bitcrazed, @cinnamon-msft on GitHub.

It would be great if the program tig worked properly in Terminal.

Here is a screenshot using tig on this repo:
image

Originally created by @decriptor on GitHub (May 20, 2019). Originally assigned to: @bitcrazed, @cinnamon-msft on GitHub. It would be great if the program [`tig`](https://github.com/jonas/tig) worked properly in Terminal. Here is a screenshot using `tig` on this repo: ![image](https://user-images.githubusercontent.com/49821/58054288-5f9b7a80-7b17-11e9-8494-c9652faab735.png)
Author
Owner

@decriptor commented on GitHub (May 20, 2019):

I cloned the repo on mac and checked out roughly the same commit that Windows was on. So, the images should be nearly identical except for the first entry.
Screenshot 2019-05-20 16 00 56

@decriptor commented on GitHub (May 20, 2019): I cloned the repo on mac and checked out roughly the same commit that Windows was on. So, the images should be nearly identical except for the first entry. <img width="899" alt="Screenshot 2019-05-20 16 00 56" src="https://user-images.githubusercontent.com/49821/58054688-94f49800-7b18-11e9-9081-8916636bd16f.png">
Author
Owner

@DHowett-MSFT commented on GitHub (May 21, 2019):

Puzzlingly, this is what I get from 0.1.1361.0:

image

@DHowett-MSFT commented on GitHub (May 21, 2019): Puzzlingly, this is what I get from 0.1.1361.0: ![image](https://user-images.githubusercontent.com/14316954/58059721-00dbfe00-7b23-11e9-9bb0-1c3cdd8907ee.png)
Author
Owner

@decriptor commented on GitHub (May 21, 2019):

Wow, this was a terrible bug report. Here are some details:
Windows: 10.0.18898 Build 18898
Terminal: 0.1.1361.0
Powershell Core: 6.2.0

I'm able to print some emojis:
image

@decriptor commented on GitHub (May 21, 2019): Wow, this was a terrible bug report. Here are some details: Windows: 10.0.18898 Build 18898 Terminal: 0.1.1361.0 Powershell Core: 6.2.0 I'm able to print some emojis: ![image](https://user-images.githubusercontent.com/49821/58063337-e57ced00-7b3a-11e9-848f-9dc564036e35.png)
Author
Owner

@DHowett-MSFT commented on GitHub (May 21, 2019):

Is this WSL tig, Cygwin tig, tig over ssh, or some other tig build? I can't reproduce it with WSL tig, which leads me to believe that (if it's Cygwin tig) it might be trying to do something irresponsible because the runtime's knowledge of Consoles stopped evolving back before I was born. 😁

@DHowett-MSFT commented on GitHub (May 21, 2019): Is this WSL tig, Cygwin tig, tig over ssh, or some other tig build? I can't reproduce it with WSL tig, which leads me to believe that (if it's Cygwin tig) it might be trying to do something irresponsible because the runtime's knowledge of Consoles stopped evolving back before I was born. :grin:
Author
Owner

@decriptor commented on GitHub (May 21, 2019):

So, this is tig in the command prompt:

----------
C:\Program Files\Git\usr\bin\tig.exe```
@decriptor commented on GitHub (May 21, 2019): So, this is tig in the command prompt: ```§ SHAWUTWIN {C:\c\MySource} [MySourceSomeBranch ↓2 ↑57 +5 ~0 -0 !]which tig Definition ---------- C:\Program Files\Git\usr\bin\tig.exe```
Author
Owner

@DHowett-MSFT commented on GitHub (May 23, 2019):

This looks like an upstream bug with git/cygwin/msys2/msys/whatever it is today. @bitcrazed will take on moving this upstream.
(EDIT: sorry other Rich Turner)

@DHowett-MSFT commented on GitHub (May 23, 2019): This looks like an upstream bug with git/cygwin/msys2/msys/whatever it is today. @bitcrazed will take on moving this upstream. (EDIT: sorry other Rich Turner)
Author
Owner

@johannesherr commented on GitHub (Jan 16, 2020):

Another problem when using tig is incorrect indentation in diffs (if the change has more than one line):

Broken in WSL:
image

The way it's supposed to look:
image

I am using WSL tig:

$ whereis tig
tig: /usr/bin/tig /usr/share/man/man1/tig.1.gz
$ tig --version
tig version 2.3.0

Microsoft Windows [Version 10.0.17763.914]

@johannesherr commented on GitHub (Jan 16, 2020): Another problem when using tig is incorrect indentation in diffs (if the change has more than one line): Broken in WSL: ![image](https://user-images.githubusercontent.com/7567298/72549033-3ee71880-3890-11ea-992e-54d147a5d08a.png) The way it's supposed to look: ![image](https://user-images.githubusercontent.com/7567298/72548960-119a6a80-3890-11ea-945e-77a3f969cce9.png) I am using WSL tig: ``` $ whereis tig tig: /usr/bin/tig /usr/share/man/man1/tig.1.gz ``` ``` $ tig --version tig version 2.3.0 ``` Microsoft Windows [Version 10.0.17763.914]
Author
Owner

@DHowett-MSFT commented on GitHub (Jan 16, 2020):

@johannesherr That feels to me like mixed up tabstops, which I believe we fixed for 10.0.18362.

@DHowett-MSFT commented on GitHub (Jan 16, 2020): @johannesherr That feels to me like mixed up tabstops, which I believe we fixed for 10.0.18362.
Author
Owner

@johannesherr commented on GitHub (Jan 17, 2020):

@DHowett-MSFT Ok, thanks for the info. Then I will wait and hope to get the update soon. :) Until then it's unfortunately back to Cygwin for me.

@johannesherr commented on GitHub (Jan 17, 2020): @DHowett-MSFT Ok, thanks for the info. Then I will wait and hope to get the update soon. :) Until then it's unfortunately back to Cygwin for me.
Author
Owner

@zadjii-msft commented on GitHub (Jan 22, 2020):

@bitcrazed Is there an upstream issue on msys/cygwin/whatever that's tracking this currently?

@zadjii-msft commented on GitHub (Jan 22, 2020): @bitcrazed Is there an upstream issue on msys/cygwin/whatever that's tracking this currently?
Author
Owner

@DHowett-MSFT commented on GitHub (Feb 20, 2020):

@bitcrazed Rich Turner FTE Is there an upstream issue on msys/cygwin/whatever that's tracking this currently?

@DHowett-MSFT commented on GitHub (Feb 20, 2020): > @bitcrazed Rich Turner FTE Is there an upstream issue on msys/cygwin/whatever that's tracking this currently?
Author
Owner

@bitcrazed commented on GitHub (Feb 21, 2020):

Not that I know of. Will work with @cinnamon-msft to get this tracked.

@johannesherr & @decriptor - do you have any repro text that we can test and verify against?

@bitcrazed commented on GitHub (Feb 21, 2020): Not that I know of. Will work with @cinnamon-msft to get this tracked. @johannesherr & @decriptor - do you have any repro text that we can test and verify against?
Author
Owner

@ToadKing commented on GitHub (Feb 21, 2020):

I'm having a slightly different render issue than previous comments.

image

The timeline lines render correctly put pressing "Enter" over a commit to bring up the message/diff gets glitchy with the divider. Also, resizing is completely broken.

I'm using Git Bash with Git for Windows 2.25.0.

$ tig --version
tig version 2.5.0
ncursesw version 6.1.20190615
readline version 8.0

$ cat ~/.tigrc
set main-options = --all --date-order

set line-graphics = utf-8
@ToadKing commented on GitHub (Feb 21, 2020): I'm having a slightly different render issue than previous comments. ![image](https://user-images.githubusercontent.com/1023440/74993705-73ab3a00-5411-11ea-9cda-17b2b4ef9f89.png) The timeline lines render correctly put pressing "Enter" over a commit to bring up the message/diff gets glitchy with the divider. Also, resizing is completely broken. I'm using Git Bash with Git for Windows 2.25.0. ``` $ tig --version tig version 2.5.0 ncursesw version 6.1.20190615 readline version 8.0 $ cat ~/.tigrc set main-options = --all --date-order set line-graphics = utf-8 ```
Author
Owner

@bitcrazed commented on GitHub (Feb 21, 2020):

@ToadKing Thanks for the info - what version of Terminal are you using?

FWIW, the team are cranking through bugs as we speak. Running Terminal v.0.9.433.0, I tried tig v2.3.0 on the Terminal repo in an Ubuntu/WSL2 session. Things look a little better (esp. re. disc symbol rendering size):
image

Hit ENTER:
image

Resizing also seems to be somewhat improved:
image

🙏 If anyone would like to add rendering glitches to this thread, please mark/circle/highlight specific issues and describe what you'd expect to see ... its sometimes a little tricky to pick out issues from a brief description. Thanks

@bitcrazed commented on GitHub (Feb 21, 2020): @ToadKing Thanks for the info - what version of Terminal are you using? FWIW, the team are cranking through bugs as we speak. Running Terminal v.0.9.433.0, I tried tig v2.3.0 on the Terminal repo in an Ubuntu/WSL2 session. Things look a little better (esp. re. disc symbol rendering size): ![image](https://user-images.githubusercontent.com/961950/74995291-52dce780-5405-11ea-89bb-b593fea07640.png) Hit <kbd>ENTER</kbd>: ![image](https://user-images.githubusercontent.com/961950/74995343-76079700-5405-11ea-80aa-39010088ee89.png) Resizing also seems to be somewhat improved: ![image](https://user-images.githubusercontent.com/961950/74995393-9c2d3700-5405-11ea-976c-c9df80d58402.png) 🙏 If anyone would like to add rendering glitches to this thread, please mark/circle/highlight specific issues and describe what you'd expect to see ... its sometimes a little tricky to pick out issues from a brief description. Thanks
Author
Owner

@ToadKing commented on GitHub (Feb 21, 2020):

I'm using Terminal 0.9.433.0.

Running tig from WSL works fine, it looks like the issues I'm running into are specifically with Git for Bash/Cygwin builds of tig. Also, it seems the corruption mainly happens when the log/diff appears in a horizontal panel like in my screenshot, not a vertical one in yours.

@ToadKing commented on GitHub (Feb 21, 2020): I'm using Terminal 0.9.433.0. Running tig from WSL works fine, it looks like the issues I'm running into are specifically with Git for Bash/Cygwin builds of tig. Also, it seems the corruption mainly happens when the log/diff appears in a horizontal panel like in my screenshot, not a vertical one in yours.
Author
Owner

@UncleInf commented on GitHub (Apr 19, 2020):

win10 1909 18363.778
terminal 0.10.781.0
msys2 20190524 (uses cygwin 3.0.7)
power shell core 6.1

Not sure if terminal problem or msys2/cygwin but still getting both rendering irregularities mentioned in this thread - branch graph, and details view (wsl works fine)

image

@UncleInf commented on GitHub (Apr 19, 2020): win10 1909 18363.778 terminal 0.10.781.0 msys2 20190524 (uses cygwin 3.0.7) power shell core 6.1 Not sure if terminal problem or msys2/cygwin but still getting both rendering irregularities mentioned in this thread - branch graph, and details view (wsl works fine) ![image](https://user-images.githubusercontent.com/9434565/79683802-20007580-8235-11ea-915c-2010e9d8e5a7.png)
Author
Owner

@DHowett-MSFT commented on GitHub (Apr 21, 2020):

@UncleInf Can you share the commandline from your msys/gitbash/cygwin profile?

If it just launches bash, instead of bash -li, that would be why this isn't working.

@DHowett-MSFT commented on GitHub (Apr 21, 2020): @UncleInf Can you share the commandline from your msys/gitbash/cygwin profile? If it just launches `bash`, instead of `bash -li`, that would be why this isn't working.
Author
Owner

@ToadKing commented on GitHub (Apr 21, 2020):

I get the same error in Git Bash installed with Git for Windows.

{
    "guid": "{118dc651-b866-4c21-8507-4962c09b9922}",
    "name" : "Git Bash",
    "commandline" : "C:/Program Files/Git/bin/bash.exe --cd-to-home",
    "icon" : "C:/Program Files/Git/mingw64/share/git/git-for-windows.ico",
    "startingDirectory" : "%HOMEDRIVE%%HOMEPATH%",
    "fontSize": 11
}

Adding -li to the commandline doesn't fix it.

@ToadKing commented on GitHub (Apr 21, 2020): I get the same error in Git Bash installed with Git for Windows. ```json { "guid": "{118dc651-b866-4c21-8507-4962c09b9922}", "name" : "Git Bash", "commandline" : "C:/Program Files/Git/bin/bash.exe --cd-to-home", "icon" : "C:/Program Files/Git/mingw64/share/git/git-for-windows.ico", "startingDirectory" : "%HOMEDRIVE%%HOMEPATH%", "fontSize": 11 } ``` Adding `-li` to the commandline doesn't fix it.
Author
Owner

@DHowett-MSFT commented on GitHub (Apr 21, 2020):

Huh. To be entirely fair, this also doesn't work outside of Terminal ...

image

This is likely due to Cygwin's VT emulation layer. I just tried it out with Cygwin >= 3.1, which gets rid of the VT emulation layer, and...

image

switch it back to 3.0.7 (has the VT emulation layer), and ...

image

We probably just need to wait for Git for Windows to upgrade to a runtime that is less old.

@DHowett-MSFT commented on GitHub (Apr 21, 2020): Huh. To be entirely fair, this also doesn't work _outside_ of Terminal ... ![image](https://user-images.githubusercontent.com/14316954/79813268-0001ac80-8330-11ea-91f0-3422006e29aa.png) This is likely due to Cygwin's VT emulation layer. I just tried it out with Cygwin >= 3.1, which _gets rid of the VT emulation layer_, and... ![image](https://user-images.githubusercontent.com/14316954/79813378-54a52780-8330-11ea-838c-b40875789b74.png) switch it back to 3.0.7 (has the VT emulation layer), and ... ![image](https://user-images.githubusercontent.com/14316954/79813595-ed3ba780-8330-11ea-885c-919a28bd562f.png) We probably just need to wait for Git for Windows to upgrade to a runtime that is less old.
Author
Owner

@ffes commented on GitHub (Nov 3, 2020):

Just an observation...

I run Terminal v1.4.2652.0 and run Git for Windows 2.27.0 (I know it's not the latest version) and it uses 3.1.4. I use tig all day every day and can't remember when I've last seen things happened as mentioned above.

Frank@pc247 MINGW64 /c/Source
$ git --version
git version 2.27.0.windows.1

Frank@pc247 MINGW64 /c/Source
$ uname -a
MINGW64_NT-10.0-19041 pc247 3.1.4-340.x86_64 2020-05-19 12:55 UTC x86_64 Msys
@ffes commented on GitHub (Nov 3, 2020): Just an observation... I run Terminal v1.4.2652.0 and run Git for Windows 2.27.0 (I know it's not the latest version) and it uses 3.1.4. I use `tig` all day every day and can't remember when I've last seen things happened as mentioned above. ``` Frank@pc247 MINGW64 /c/Source $ git --version git version 2.27.0.windows.1 Frank@pc247 MINGW64 /c/Source $ uname -a MINGW64_NT-10.0-19041 pc247 3.1.4-340.x86_64 2020-05-19 12:55 UTC x86_64 Msys ```
Author
Owner

@wjrogers commented on GitHub (Nov 3, 2020):

I think most of the problem was fixed in Git for Windows release 2.27. Tig renders normally for me now, for the most part. I still get some spurious spacing in console output when tig shells out to commit. I also get an occasional hang when transitioning back to tig after committing. But it's much better!

@wjrogers commented on GitHub (Nov 3, 2020): I think most of the problem was fixed in Git for Windows release 2.27. Tig renders normally for me now, for the most part. I still get some spurious spacing in console output when tig shells out to commit. I also get an occasional hang when transitioning back to tig after committing. But it's much better!
Author
Owner

@ToadKing commented on GitHub (Nov 3, 2020):

I can confirm tig renders correctly in Windows Terminal now as well. Git for Windows version 2.29.2.windows.1

@ToadKing commented on GitHub (Nov 3, 2020): I can confirm tig renders correctly in Windows Terminal now as well. Git for Windows version 2.29.2.windows.1
Author
Owner

@zadjii-msft commented on GitHub (Nov 3, 2020):

Oh, well that's a pleasant surprise! I guess we can just close this one out then, thanks for the follow-ups all!

@zadjii-msft commented on GitHub (Nov 3, 2020): Oh, well that's a pleasant surprise! I guess we can just close this one out then, thanks for the follow-ups all!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#1227