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

Erase sequences should not be affected by current coloring #51

Closed
xiaq opened this issue Feb 14, 2016 · 4 comments
Closed

Erase sequences should not be affected by current coloring #51

xiaq opened this issue Feb 14, 2016 · 4 comments

Comments

@xiaq
Copy link

xiaq commented Feb 14, 2016

This will color the whole termux terminal red: echo -e '\033[41m\033[J'. No other terminal emulators that I know of exhibit this behavior.

This is because termux fill the affected area with the current foreground and background coloring when it receives the erase area sequence \033[J.

The erase line sequence, \033[K, is also affected.

@fornwall
Copy link
Member

Thanks, will look into this!

When I test default (1) the OS X Terminal.app, (2) iTerm and (3) xterm they all seem to do the same thing as Termux here.

This seems to come from these terminals supporting the background color erase functionality. See e.g. this bug about this behaviour where it was added to another terminal emulator.

Which terminal emulators have you tested with that does not use the the current fg and bg colors when clearing?

@xiaq
Copy link
Author

xiaq commented Feb 14, 2016

I don't have access to a real computer at this moment, will check a bit later.

@fornwall
Copy link
Member

@xiaq Have you been able to check the issue?

I think for \033[J and \033[K the background color should be used as argued above, but the original problem you had with Termux could be another issue perhaps?

@xiaq
Copy link
Author

xiaq commented Feb 29, 2016

Hmm, I checked and it seems that every emulator but tmux fills the background color. My mistake.

@xiaq xiaq closed this as completed Feb 29, 2016
@ghost ghost locked and limited conversation to collaborators Oct 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants