mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-30 09:33:39 +01:00
Global: prevents ascii logo from being overwritten in --dynamic-interval mode
This commit is contained in:
+3
-1
@@ -765,9 +765,11 @@ static void run(FFdata* data) {
|
||||
}
|
||||
|
||||
if (instance.state.dynamicInterval > 0) {
|
||||
ffLogoPrintRemaining(); // `logoLineCacheClear` inside so that ffLogoPrintLine will use `\e[nC` to move the cursor to the right position instead of reprinting the logo
|
||||
fputs("\e[J", stdout); // Clear from cursor to the end of the screen to prevent artifacts when the new output is shorter than the previous one
|
||||
fflush(stdout);
|
||||
ffTimeSleep(instance.state.dynamicInterval);
|
||||
fputs("\e[H", stdout);
|
||||
fputs("\e[H", stdout); // Move cursor to the top left corner to overwrite the previous output
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user