From 70f352251e314cb5a3acb9bb799bc966efc082c3 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Wed, 25 Jun 2014 19:59:27 -0600 Subject: [PATCH] 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. --- src/editor.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/editor.coffee b/src/editor.coffee index 1104c6e7a..06b7ae6ef 100644 --- a/src/editor.coffee +++ b/src/editor.coffee @@ -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