Skip to content

Commit ec25307

Browse files
Put cursor at the end of last line for lit progress animation (#464)
The cursor was placed at the middle of the first progress line
1 parent 9595fce commit ec25307

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/TSCUtility/ProgressAnimation.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,8 @@ public final class RedrawingLitProgressAnimation: ProgressAnimationProtocol {
219219
terminal.write(header, inColor: .cyan, bold: true)
220220
terminal.endLine()
221221
hasDisplayedHeader = true
222+
} else {
223+
terminal.moveCursor(up: 1)
222224
}
223225

224226
terminal.clearLine()
@@ -242,8 +244,6 @@ public final class RedrawingLitProgressAnimation: ProgressAnimationProtocol {
242244
} else {
243245
terminal.write(text)
244246
}
245-
246-
terminal.moveCursor(up: 1)
247247
}
248248

249249
public func complete(success: Bool) {

0 commit comments

Comments
 (0)