You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I create a textAnimation, only everything after the last \n is cleared and redrawn.
importcom.github.ajalt.mordant.animation.textAnimationimportcom.github.ajalt.mordant.terminal.Terminalfunmain() {
val terminal =Terminal()
val animation = terminal.textAnimation<Int> { value ->"${value}\n" }
for (i in1..5) {
animation.update(i)
Thread.sleep(250)
}
}
This results in:
1
2
3
4
5
However, when I add something after the final newline, e.g. "${value}\nTest", "Test" is drawn and replaced each time and ends up like so:
1
2
3
4
5
Test
Am I missing something, or is this a bug?
Edit: This is in the IntelliJ built-in terminal. Maybe related to #49?
The text was updated successfully, but these errors were encountered:
When running in a terminal with the generated run script by IntelliJ it doesn't work as intended, but when run through gradle :installDist && build/install/<…> it displays correctly.
Edit: When displayed in a normal terminal, proving that the problem lies in the IntelliJ run output 'terminal'.
I guess part of the question is: Is there a way to marry IntelliJ's "Run" feature with the terminal functionality Mordant needs somehow?
pindab0ter
changed the title
Animations with newlines do not render correctly
Animations with newlines do not render correctly in JetBrains' run output
Dec 8, 2024
You're correct that this is a known issue. Last I checked, the IntelliJ console doesn't support ANSI cursor movements, and we have code to specifically handle that case. Are you saying that you were able to get multi-line animations working on the IntelliJ console?
Unfortunately no. What's more, animations in tasks run through Gradle also perform poorly. In the end I had to use the installDist task to generate a binary and run that to be able to reach 60fps. Maybe good to note somewhere in the docs.
When I create a
textAnimation
, only everything after the last\n
is cleared and redrawn.This results in:
However, when I add something after the final newline, e.g.
"${value}\nTest"
, "Test" is drawn and replaced each time and ends up like so:Am I missing something, or is this a bug?
Edit: This is in the IntelliJ built-in terminal. Maybe related to #49?
The text was updated successfully, but these errors were encountered: