JakeWharton / mosaic

Build terminal UI in Kotlin using Jetpack Compose
Apache License 2.0
1.89k stars 57 forks source link

No trailing spaces when drawing on canvas #439

Open EpicDima opened 1 month ago

EpicDima commented 1 month ago

In AnsiLevel.NONE mode, trailing spaces will be added if they have a style (which of course will not be visible in this mode). This can be fixed, but:

1) It is convenient for some tests, where you need to clearly see that spaces are added to the right (for this you can simply specify any background for a Composable element). This is easier than including ANSI commands in the output, as there is a lot of excess, which is almost always unnecessary for a simple test.

2) It seems that AnsiLevel.NONE is not common, while limiting the possible functionality of a Mosaic-based application, therefore, in my opinion, there is nothing wrong with trailing spaces in such cases.