Don't render line decorations on mini editors

This commit is contained in:
Nathan Sobo 2014-07-13 14:56:34 -06:00
parent 544c759fd1
commit a9c7842a50
2 changed files with 6 additions and 1 deletions

View File

@ -2019,6 +2019,9 @@ describe "EditorComponent", ->
it "does not assign an explicit line-height on the editor contents", ->
expect(componentNode.style.lineHeight).toBe ''
it "does not apply cursor-line decorations", ->
expect(component.lineNodeForScreenRow(0).classList.contains('cursor-line')).toBe false
describe "legacy editor compatibility", ->
it "triggers the screen-lines-changed event before the editor:display-update event", ->
editor.setSoftWrap(true)

View File

@ -278,7 +278,9 @@ EditorComponent = React.createClass
cursorPixelRects
getLineDecorations: (decorationsByMarkerId) ->
{editor} = @props
{editor, mini} = @props
return {} if mini
decorationsByScreenRow = {}
for markerId, decorations of decorationsByMarkerId
marker = editor.getMarker(markerId)