diff --git a/spec/editor-component-spec.coffee b/spec/editor-component-spec.coffee index 2b255fb44..b50a18b8e 100644 --- a/spec/editor-component-spec.coffee +++ b/spec/editor-component-spec.coffee @@ -115,9 +115,14 @@ describe "EditorComponent", -> describe "when soft wrapping is enabled", -> beforeEach -> + editor.setText "a line that wraps " editor.setSoftWrap(true) + node.style.width = 15 * charWidth + 'px' + component.measureHeightAndWidth() - it "doesn't show the end of line invisible at the end of lines broken due to wrapping", -> + it "doesn't show end of line invisibles at the end of wrapped lines", -> + expect(component.lineNodeForScreenRow(0).textContent).toBe "a line that " + expect(component.lineNodeForScreenRow(1).textContent).toBe "wraps#{invisibles.space}#{invisibles.eol}" it "displays trailing carriage return using a visible non-empty value", -> diff --git a/src/lines-component.coffee b/src/lines-component.coffee index e88b65c56..771b9325f 100644 --- a/src/lines-component.coffee +++ b/src/lines-component.coffee @@ -152,7 +152,7 @@ LinesComponent = React.createClass innerHTML buildEndOfLineHTML: (line, invisibles) -> - return '' if @props.mini + return '' if @props.mini or line.isSoftWrapped() eolInvisibles = [] eolInvisibles.push(invisibles.cr) if invisibles.cr? and line.lineEnding is '\r\n'