Closed dkim19375 closed 1 year ago
Also, wanted to add that \r
does work correctly (when creating my own simple progress indicator that just shows how much of the file has been downloaded), so maybe Mordant is missing a \r at the end for some reason?
And the question mark issue might not be related, but still showed it in case you had an idea of why it was happening :)
Fixed by setting my Windows locale thing to UTF-8 and so I'll update the results
So the root of the issue is that IntelliJ's console doesn't support cursor movements.
The fix was to stop using them when running in IntelliJ. But since we can't move the cursor,
it has to stay on the same line as the progress bar after stop
so that clear
and update
still work.
So you'll have to print the newline yourself if you want to print something after calling stop
.
animation.stop()
if (terminal.info.crClearsLine) terminal.println()
terminal.println("Done!")
Code:
Results
Colors are all correct
Terminal(AnsiLevel.TRUECOLOR, interactive = true)
In IntelliJ, if I click the green play button next to the
fun main()
, it gives this output:In IntelliJ, if I run
gradle run
, it gives me this output: https://[bytebin.lucko.me/YYX3ti3hsk](https://bytebin.lucko.me/YYX3ti3hsk) In IntelliJ, if I go into the built-in terminal and runjava -jar Program.jar
, I get:In Windows Terminal -> Command Prompt, if I run
gradlew.bat run
, I get this output:In Windows Terminal, if I run
java -jar Program.jar
, I get this outputDefault Terminal
In IntelliJ, with the green play button:
With
gradle run
, I just get aDone!
(as expected from the previous github issue) Withjava -jar Program.jar
, I getIn Windows Terminal, if I run
gradlew.bat run
, I get aDone!
(as expected from the previous github issue) In Windows Terminal, if I runjava -jar Program.jar
, I getWhat am I doing wrong? And why are the results so inconsistent (and not giving expected results)?