mirror of
https://github.com/atom/atom.git
synced 2026-01-24 06:18:03 -05:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user