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

Commit

Permalink
Extract showCursor into a variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
vlad-shatskyi committed Jun 7, 2017
1 parent 773ccda commit eea6502
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/views/BufferComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ export class BufferComponent extends React.Component<Props, State> {

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

return (
<div className="output"
Expand All @@ -106,7 +107,7 @@ export class BufferComponent extends React.Component<Props, State> {
<RowComponent
key={index}
row={row}
hasCursor={index === buffer.cursorRow && this.props.job.status === Status.InProgress && (buffer._showCursor || buffer._blinkCursor)}
hasCursor={index === buffer.cursorRow && showCursor}
status={this.props.job.status}
job={this.props.job}/>
);
Expand Down

0 comments on commit eea6502

Please sign in to comment.