Only apply cursor-line decoration to head; Add selected-line decoration.

The cursor-line decoration shouldn't be applied to every line that's
selected. It should only be applied to the location of the cursor. We'll
need to update themes to reflect this.
This commit is contained in:
Nathan Sobo
2014-06-25 19:59:27 -06:00
parent 1b05708d7a
commit 70f352251e

View File

@@ -1244,7 +1244,8 @@ class Editor extends Model
addCursor: (marker) ->
cursor = new Cursor(editor: this, marker: marker)
@cursors.push(cursor)
@addDecorationForMarker(marker, type: ['gutter', 'line'], class: 'cursor-line')
@addDecorationForMarker(marker, type: ['gutter', 'line'], class: 'cursor-line', onlyHead: true)
@addDecorationForMarker(marker, type: ['gutter', 'line'], class: 'selected-line')
@emit 'cursor-added', cursor
cursor