ConsoleDraw icon indicating copy to clipboard operation
ConsoleDraw copied to clipboard

ANSI colour codes are broken

Open TabbyToffee opened this issue 1 year ago • 1 comments

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

TabbyToffee avatar Sep 07 '24 16:09 TabbyToffee

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

Matthias1590 avatar Sep 08 '24 12:09 Matthias1590