Skip to content
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

Help with 256 color support on Windows #1968

Closed
2 tasks done
LukeFlynn opened this issue Jul 2, 2017 · 47 comments
Closed
2 tasks done

Help with 256 color support on Windows #1968

LukeFlynn opened this issue Jul 2, 2017 · 47 comments
Labels
👆 Is Upstream Issue is the fault of something Hyper uses and not Hyper itself 🖼 Platform: Windows Issue pertains to Windows

Comments

@LukeFlynn
Copy link

LukeFlynn commented Jul 2, 2017

  • I am on the latest Hyper.app version
  • I have searched the issues of this repo and believe that this is not a duplicate
  • OS 10.0.15063 and Windows:
  • Hyper.app 1.3.3:
  • Link of my .hyper.js
  • The issue is reproducible in vanilla Hyper.app:

Issue

Hi,

I would like to be able to use full 256color in Hyper. Setting the env variable TERM to xterm-256color displays colors perfectly.. but it breaks the functionality of the "clear" command. Is there some other way I can accomplish displaying the colors properly while retaining functionality of clear?

@lijunle
Copy link

lijunle commented Jul 21, 2017

Another issue with TERM=xterm-256color, the vim will mess the screen content with the editing content.

@sanguine8082
Copy link

Windows Command Prompt does not support 256 colors 😢

You will need to use a different terminal, like Git For Windows or Msys2 to get 256 color support, and then point hyper.js to their respective executable.

@sanguine8082
Copy link

I think Windows 10 might have support, but not before that.

@Xapphire13
Copy link
Contributor

Xapphire13 commented Aug 23, 2017

Windows 10 does support 256 colors as of TH2, see here

When running AnsiColors256.ans via type AnsiColors256.ans in PowerShell I get:

image

But running the same command in Hyper I get:
image

@tdurand
Copy link

tdurand commented Jan 22, 2018

Same issue here, is a fix underway ?

I have issue with this git config for diffs

[color "diff-highlight"]
        oldNormal = red bold
        oldHighlight = red bold 52
        newNormal = green bold
        newHighlight = green bold 22

terminaldiff

@chabou
Copy link
Collaborator

chabou commented Jan 23, 2018

@tdurand can you confirm me that you are on Windows?

@chabou
Copy link
Collaborator

chabou commented Jan 23, 2018

Using GitBash with Hyper (2.0.0-canary.10), this is what I get when running AnsiColors256.ans :
image

And WTF, my mouse pointer goes UNDER the grey zones... 😱

(It works well on macOS)

@tdurand
Copy link

tdurand commented Jan 23, 2018

Yes, i'm on Windows 10 using WSL with Ubuntu. And the color works well if you use the powershell terminal, so I'm pretty sure it's an issue of hyper.

@chabou chabou added the 🖼 Platform: Windows Issue pertains to Windows label Jan 23, 2018
@chabou
Copy link
Collaborator

chabou commented Jan 23, 2018

Yes, an issue with Hyper (but only on Windows, from my testing).

@kaminooni
Copy link

I ran into the same problem. And since I use vim (with a lot of color schemes) for coding, it makes hyper almost unusable 😞

shot

@dougmaitelli
Copy link

dougmaitelli commented Feb 26, 2018

Even worse here:

image

Related? #2327

@Macmee
Copy link

Macmee commented Feb 27, 2018

any movement on this issue?

@dougmaitelli
Copy link

I did a lot and research, testing. It seems it is not a Hyper issue. It is a node-pty issue because of a limitation in the way they interact with processes on Windows. So basically it seems to be still a Windows limitation.

You can even confirm this because the integrated shell in vs code has exactly the same issue, and they even use winpty instead of node-pty.

@skegel13
Copy link

I am guessing as well it's not necessarily a Hyper issue since it occurs in VSCode as well as ConEmu. I am wondering though how Git Bash by itself or PuTTY does it. I can open Vim locally or when I ssh into a server with no issues. If I run Git Bash in Hyper though, I get the color issues.

@scottbilas
Copy link

ConEmu supports 256 and true color. Needs a bit of config.

https://conemu.github.io/en/Xterm256Colors.html

It works via a hook dll that monitors direct calls to write to the console, processing escape codes etc. There's also quite a lot of special case code, including detection of the vim process and powershell.

https://github.com/Maximus5/ConEmu/blob/master/src/ConEmuHk/hkConsoleOutput.cpp

@szmarczak
Copy link

Any news?

@florisvaneck
Copy link

florisvaneck commented Apr 14, 2018

I would appreciate an update on this! Really harming my otherwise fantastic Hyper experience on Windows! Not seeing this issue in Hyper on Ubuntu (VMware).

I am using the hyper-solarized-dark-highcontrast theme to make it slightly less worse.

@albinekb
Copy link
Contributor

This is a windows issue @florisvaneck, not much we can do.

@szmarczak
Copy link

Hyper 2.0.0 stable:

image

@Stanzilla
Copy link
Collaborator

That's xtermjs/xterm.js#484

@Stanzilla Stanzilla added the 👆 Is Upstream Issue is the fault of something Hyper uses and not Hyper itself label Apr 23, 2018
@Tyriar
Copy link
Contributor

Tyriar commented Apr 24, 2018

@Stanzilla this is not actually xtermjs/xterm.js#484, that's for truecolor (16 million) color support. 256 color support in Windows is due to winpty: microsoft/vscode#45693

@dvf
Copy link

dvf commented Jun 12, 2018

Has this been resolved?

@Xapphire13
Copy link
Contributor

@dvf, nope the issue is still repro

@panda2134
Copy link

repro again on windows 10 build 1803 with hyper 2.1.0-canary2

@jasonxoc
Copy link

Ohh I should have searched for this issue before taking the time to make this:
hyperjs-colors_messed_up

Man, windows terminal emulation sucks SOOO bad. Nothing but issues with drawing, color support, mouse support with tmux and vim. ... Hoping I can finally get gnome-terminal to work at some point.

@Josema
Copy link

Josema commented Aug 21, 2018

Any news?

@monsterkodi
Copy link

This is related news: microsoft/terminal#57
A lot of console problems will probably be solved this fall/winter.

@Tyriar
Copy link
Contributor

Tyriar commented Aug 22, 2018

More specifically for hyper: microsoft/node-pty#216

@monsterkodi
Copy link

Better 30 years late than never :-)

@prinsss
Copy link

prinsss commented Sep 7, 2018

Same issue here, Hyper 2.0.0 on Windows 10 1803. Any news?

screenshot

@Tyriar
Copy link
Contributor

Tyriar commented Sep 8, 2018

@printempw I'm working on microsoft/node-pty#216 which is expected to fix this, ETA is still a while off though.

@duemti
Copy link

duemti commented Jan 1, 2019

Pardon me, but why SSH to virtual machine also doesn't display colors?
I don't think it's WSL specific bug. Heck, it even in windows environment doesn't print colors right.

untitled

Here Hyperterm at the left and GitBash at the right.
untitled2

@Tyriar
Copy link
Contributor

Tyriar commented Jan 2, 2019

This can be marked as fixed when Hyper adopts node-pty@0.8.0 https://github.com/Microsoft/node-pty/releases/tag/0.8.0. To be clear, it will not work for < Windows 10 1809 and non-WSL may or may not work.

@duemti
Copy link

duemti commented Jan 6, 2019

Thank you very much for hinting.
Updated windows and on Terminus terminal it show all 256 colors.
For those wondering, install it with npm:
npm i terminus-terminal

@JesseVelden
Copy link

Thank you very much for hinting.
Updated windows and on Terminus terminal it show all 256 colors.
For those wondering, install it with npm:
npm i terminus-terminal

That's not a solution for hyper though. Anyway thanks for pointing out a nice alternative.

@RReverser
Copy link

This can be marked as fixed when Hyper adopts node-pty@0.8.0 https://github.com/Microsoft/node-pty/releases/tag/0.8.0.

This was now done in #3329, so I suppose the issue should be fixed?

@auslander
Copy link

Updated to Hyper 3.0.0 Canary 6 and still having the issue. Been fighting this off and on for months and just found this thread today. Thought I was just doing something wrong.
cat AnsiColors256.ans

@szmarczak
Copy link

Yup, still doesn't work. Latest Windows 10 and canary 6:

image

@duemti
Copy link

duemti commented Feb 3, 2019

Actually it works. Probably you need to update your Windows 10 to build 1809 or higher.

image

@szmarczak
Copy link

Probably you need to update your Windows 10 to build 1809 or higher.

I'll give it a try. I've been putting off some updates for a few days due to some important work. I'll inform you later, thanks :)

@auslander
Copy link

Thanks for the update. Going through now and attempting to apply the 1809 update manually using the tool at microsoft.com. I had assumed windows update was automatically pushing the October update by this point but was mistaken. Trying now.

@Tyriar
Copy link
Contributor

Tyriar commented Feb 4, 2019

FYI there are several issues in Windows 1809 and I moved the default minimum version in node-pty to what is the current fast ring Windows Insiders build, so you should get this in windows 1903.

@szmarczak
Copy link

So we have to wait a lil bit more...

@heamaral
Copy link

heamaral commented Feb 5, 2019

I've updated my windows to test it, and it works.
But clear isn't cleaning the buffer:

and caret doesn't hide when interacting with some interactive application:

@szmarczak
Copy link

After I've updated my Windows it works as expected 🎉

image

@MortezaRamezani
Copy link

It still doesn't work with msys2 on the latest version, mintty with msys2 works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👆 Is Upstream Issue is the fault of something Hyper uses and not Hyper itself 🖼 Platform: Windows Issue pertains to Windows
Projects
None yet
Development

No branches or pull requests