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

ANSI colour codes are broken #4

Open
TabbyToffee opened this issue Sep 7, 2024 · 1 comment
Open

ANSI colour codes are broken #4

TabbyToffee opened this issue Sep 7, 2024 · 1 comment

Comments

@TabbyToffee
Copy link

TabbyToffee commented Sep 7, 2024

If you use an ANSI colour code, you will exceed the grid size before you reach the end of the console.
Here is some example code:

from consoledraw import Console

console = Console()

printOut = ""

while True:
	with console:
		console.print(printOut)

	printOut += "\033[0;32;40mHello Goodbye  "

The code gives an error before it reaches the end of the screen:
image

@Matthias1590
Copy link
Owner

I think a good way to solve this would be to interpret ansi codes, but since not every terminal supports it, maybe it should be a flag in the console constructor

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

2 participants