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

Improper ANSI escape handling on Windows #7926

Open
aymanhs opened this issue Feb 13, 2023 · 6 comments
Open

Improper ANSI escape handling on Windows #7926

aymanhs opened this issue Feb 13, 2023 · 6 comments

Comments

@aymanhs
Copy link

aymanhs commented Feb 13, 2023

Version: 1.0.188
Platform: Windows x64 10.0.19044
Plugins: none
Frontend: xterm

ANSI escapes not handled properly.

Eg this is is output with colors:

9:05AM INF New connection 9:05AMremote-addr= [::1]:58400
ERR bad request msg=48454c4c4f2032
9:05AM INF Closed connection remote-addr=[::1]:58400
image

The first line should break at 9:05AM

This same output is generated on Mintty cygwin:
image

@Eugeny
Copy link
Owner

Eugeny commented Feb 13, 2023

Please provide a dump of your terminal state as described here: https://github.com/Eugeny/terminus/wiki/Posting-terminal-state

GitHub
A terminal for a more modern age. Contribute to Eugeny/tabby development by creating an account on GitHub.

@aymanhs
Copy link
Author

aymanhs commented Feb 14, 2023

"\r\n08:37:52 \u001b[34m~\r\n\u001b[35m❯\u001b[0m cd code/go/bullproxy/\r\n\r\n08:38:07 \u001b[34mcode/go/bullproxy\u001b[0m \u001b[90mmain\u001b[91m*​☺\u001b[0m☻\u001b[36m \r\n\u001b[35m❯\u001b[0m go run .\r\n\u001b[90m8:38AM\u001b[0m \u001b[32mINF\u001b[0m HSM proxy loaded\r\npanic: dial tcp 10.61.160.3:2001: connectex: No connection could be made because the target machine actively refused it.\r\n\r\ngoroutine 1 [running]:\r\nmain.main()\r\n C:/Ayman/code/go/bullproxy/main.go:45 +0x3b4\r\nexit status 2\r\n\r\n08:38:18 \u001b[34mcode/go/bullproxy\u001b[0m \u001b[90mmain\u001b[91m*​☺\u001b[0m☻\u001b[36m \u001b[33m7s\r\n\u001b[31m❯\u001b[0m code .\r\n\r\n08:38:35 \u001b[34mcode/go/bullproxy\u001b[0m \u001b[90mmain\u001b[91m*​☺\u001b[0m☻\u001b[36m \r\n\u001b[35m❯\u001b[0m go run .\r\n\u001b[90m8:39AM\u001b[0m \u001b[32mINF\u001b[0m HSM proxy loaded\r\n\u001b[90m8:39AM\u001b[0m \u001b[32mINF\u001b[0m Connected to device\r\n\u001b[90m8:39AM\u001b[0m \u001b[90mINF\u001b[0m New connection 8:39AM\u001b[36mremote-addr=\u001b[90m \u001b[0m[::1]:61006\r\n\u001b[31mERR\u001b[90m bad request \u001b[36mmsg=\u001b[90m48454c4c4f2033\r\n8:39AM \u001b[32mINF\u001b[90m Closed connection \u001b[36mremote-addr=\u001b[90m[::1]:61006\u001b[1B\u001b[52D\u001b[0m"

@aymanhs
Copy link
Author

aymanhs commented Feb 14, 2023

Looking at the above, I see that the display matches the escape sequences. So any idea why the display on Cygwin mintty looks different than on Tabby? Is it possible the program itself is not sending the correct ANSI escapes?
The output is generated from a Go language program and uses zerolog console writer.
But I did notice that some other programs, sometimes vim, do not display correct output. This occurred most probably with the latest update

@Eugeny
Copy link
Owner

Eugeny commented Feb 14, 2023

Could you check whether this is fixed in the nightly, especially with different settings for Profiles -> Advanced -> Terminal identification?

@aymanhs
Copy link
Author

aymanhs commented Feb 14, 2023

Thanks for the response.

I loaded the Nightly and got similar results with Terminal=cygwin and with Terminal=Windows

I have also tried to remove my export TERM=xterm-256color and got similar results.

I had issues before with some Linux remote apps not linking the TERM=cygwin setting I noticed before, so I put the TERM=xterm-256color earlier and that was fine.

Should TERM be set to something specific?

@InanisOmnia
Copy link

Also having this issue

Windows 10
Tabby 1.0.195

Anyone got any fixes? Or plans for updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants