atom/atom — pull request #2757 by nathansobo (2014-06-27 11:46:22+00:00)
Title: Improve default decorations for cursor and selection lines in React editor

Fixes #2701

This PR updates the decorations on lines and line numbers in the following way:

* When the cursor is on a certain line, its line and line number will have the `.cursor-line` class.
* When a selection spans lines, their line and line numbers will have the `.selection-line` class.
* If the selection is empty, the cursor's line will *also* contain the `.cursor-line-no-selection` class. I'd prefer this to be synthesized with `.cursor-line:not(.selection-line)` but we need it for backward compatibility.

Previously, the `.cursor-line` class would be applied to every line number in a selection, but now it's only applied to the line containing the cursor for consistency with what we do on line elements. This means certain themes will need to switch `.line-number.cursor-line` to `.line-number.selection-line` for the same effect. To support these themes in the old editor, we now also add `.selection-line` to the line numbers in the gutter.

Here you can see the line highlight working again in the light theme.
![screenshot 2014-06-27 05 42 26](https://cloud.githubusercontent.com/assets/1789/3410971/23ee49b2-fdf0-11e3-9192-f708ac393ded.png)