Skip to content

Commit

Permalink
Merge pull request #198 from jichu4n/cursor
Browse files Browse the repository at this point in the history
Set cursor style to inverse of regular background and foreground colors.
  • Loading branch information
f committed Oct 15, 2015
2 parents 6d20107 + dbc2359 commit 43b22bd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 10 additions & 0 deletions lib/TermView.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,16 @@ class TermView extends View
@opts.fontSize or
atom.config.get('editor.fontSize')
) + "px"
# Insert style for cursor.
[..., bg, fg] = @opts.colors.map (color) -> color.toHexString()
cursorStyleElement = $(
"<style>
.terminal-cursor {
background-color: #{fg};
color: #{bg};
}
</style>")
$(@term.element).prepend cursorStyleElement

attachEvents: ->
@resizeToPane = @resizeToPane.bind this
Expand Down
4 changes: 0 additions & 4 deletions styles/term2.less
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
}
}

.terminal-cursor {
background-color: #fff;
}

span {
white-space: pre;
}
Expand Down

0 comments on commit 43b22bd

Please sign in to comment.