Merge pull request #2676 from atom/bo-cursor-gutter

Don’t render decorations on the last empty line when selection not empty
This commit is contained in:
Ben Ogle
2014-06-19 15:10:18 -07:00
2 changed files with 15 additions and 3 deletions

View File

@@ -236,9 +236,13 @@ EditorComponent = React.createClass
for decoration in decorations
if editor.decorationMatchesType(decoration, 'gutter') or editor.decorationMatchesType(decoration, 'line')
screenRange ?= marker.getScreenRange()
for screenRow in [screenRange.start.row..screenRange.end.row]
startRow = screenRange.start.row
endRow = screenRange.end.row
endRow-- if not screenRange.isEmpty() and screenRange.end.column == 0
for screenRow in [startRow..endRow]
decorationsByScreenRow[screenRow] ?= []
decorationsByScreenRow[screenRow].push decoration
decorationsByScreenRow
getHighlightDecorations: (decorationsByMarkerId) ->