diff --git a/src/Buffer.ts b/src/Buffer.ts index b892804a8..3ccff9606 100644 --- a/src/Buffer.ts +++ b/src/Buffer.ts @@ -79,10 +79,10 @@ export default class Buffer extends events.EventEmitter { this._attributes = attributesFlyweight(Object.assign({}, this._attributes, attributes)); } - toRenderable(fromStorage = this.storage): List> { + toRenderable(status: e.Status, fromStorage = this.storage): List> { let storage = fromStorage; - if (this.cursor.show || this.cursor.blink) { + if (status === e.Status.InProgress && (this.cursor.show || this.cursor.blink)) { const coordinates = [this.cursorPosition.row, this.cursorPosition.column]; if (!storage.get(this.cursorPosition.row)) { @@ -103,8 +103,8 @@ export default class Buffer extends events.EventEmitter { return storage; } - toCutRenderable(): List> { - return this.toRenderable(>>(this.storage.takeLast(Buffer.hugeOutputThreshold))); + toCutRenderable(status: e.Status): List> { + return this.toRenderable(status, >>(this.storage.takeLast(Buffer.hugeOutputThreshold))); } toLines(): string[] { diff --git a/src/Cursor.ts b/src/Cursor.ts index f455f13b2..f4535882c 100644 --- a/src/Cursor.ts +++ b/src/Cursor.ts @@ -1,5 +1,5 @@ export default class Cursor { - private _show = false; + private _show = true; private _blink = false; constructor(private position: RowColumn = { row: 0, column: 0 }) { diff --git a/src/Job.ts b/src/Job.ts index e91970f6b..d38f05323 100644 --- a/src/Job.ts +++ b/src/Job.ts @@ -48,7 +48,6 @@ export default class Job extends EmitterWithUniqueID { try { await CommandExecutor.execute(this); - this.buffer.showCursor(false); // Need to check the status here because it's // executed even after the process was interrupted. if (this.status === Status.InProgress) { @@ -61,7 +60,6 @@ export default class Job extends EmitterWithUniqueID { } handleError(message: string): void { - this.buffer.showCursor(false); this.setStatus(Status.Failure); if (message) { this._buffer.writeMany(message); diff --git a/src/views/BufferComponent.tsx b/src/views/BufferComponent.tsx index d84fb4b1a..c1df2c391 100644 --- a/src/views/BufferComponent.tsx +++ b/src/views/BufferComponent.tsx @@ -91,6 +91,6 @@ export default class BufferComponent extends React.Component { }; private get renderableRows(): List> { - return this.shouldCutOutput ? this.props.job.buffer.toCutRenderable() : this.props.job.buffer.toRenderable(); + return this.shouldCutOutput ? this.props.job.buffer.toCutRenderable(this.props.job.status) : this.props.job.buffer.toRenderable(this.props.job.status); } }