Skip to content
This repository was archived by the owner on May 21, 2019. It is now read-only.

Commit eea6502

Browse files
committed
Extract showCursor into a variable.
1 parent 773ccda commit eea6502

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/views/BufferComponent.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ export class BufferComponent extends React.Component<Props, State> {
9191

9292
render() {
9393
const buffer = this.props.job.screenBuffer;
94+
const showCursor = this.props.job.status === Status.InProgress && (buffer._showCursor || buffer._blinkCursor);
9495

9596
return (
9697
<div className="output"
@@ -106,7 +107,7 @@ export class BufferComponent extends React.Component<Props, State> {
106107
<RowComponent
107108
key={index}
108109
row={row}
109-
hasCursor={index === buffer.cursorRow && this.props.job.status === Status.InProgress && (buffer._showCursor || buffer._blinkCursor)}
110+
hasCursor={index === buffer.cursorRow && showCursor}
110111
status={this.props.job.status}
111112
job={this.props.job}/>
112113
);

0 commit comments

Comments
 (0)