Skip to content

Commit

Permalink
fix: close #8
Browse files Browse the repository at this point in the history
Erase the end of the line after changing cursor position and before
printing new text in task component.

Refs: #8
  • Loading branch information
LouisP0 committed Nov 2, 2024
1 parent 4c20fa7 commit ba13b91
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/src/application/components/task.dart
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ final class StepManager with TerminalTools {

buffer.writeAnsiAll([
CursorPosition.moveToColumn(_position!.$1),
Clear.untilEndOfLine,
..._theme.loadingSymbolColor,
Print(_theme.loadingSymbols[_loadingStep]),
SetStyles.reset
Expand All @@ -78,6 +79,7 @@ final class StepManager with TerminalTools {

buffer.writeAnsiAll([
CursorPosition.moveTo(_position!.$2 + _lineCount, _position!.$1),
Clear.untilEndOfLine,
..._theme.successPrefixColor,
Print(_theme.successPrefix),
SetStyles.reset,
Expand All @@ -98,6 +100,7 @@ final class StepManager with TerminalTools {

buffer.writeAnsiAll([
CursorPosition.moveTo(_position!.$2 + _lineCount, _position!.$1),
Clear.untilEndOfLine,
..._theme.warningPrefixColor,
Print(_theme.warningPrefix),
SetStyles.reset,
Expand All @@ -118,6 +121,7 @@ final class StepManager with TerminalTools {

buffer.writeAnsiAll([
CursorPosition.moveTo(_position!.$2 + _lineCount, _position!.$1),
Clear.untilEndOfLine,
..._theme.errorPrefixColor,
Print(_theme.errorPrefix),
SetStyles.reset,
Expand Down

0 comments on commit ba13b91

Please sign in to comment.