Don't expect trailing whitespace invisibles on soft-wrapped lines

Now that trailing whitespace status of tokens is assigned at
construction time, we no longer render invisibles at the end of
soft-wrapped lines. Pretty sure this is not a behavior we wanted anyway.
This commit is contained in:
Nathan Sobo 2014-04-11 08:55:16 -06:00
parent 9ec38ddb0d
commit e3eb51c135

View File

@ -1592,7 +1592,7 @@ describe "EditorView", ->
editor.setSoftWrap(true)
it "doesn't show the end of line invisible at the end of lines broken due to wrapping", ->
editor.setText "a line that wraps"
editor.setText "a line that wraps "
editorView.attachToDom()
editorView.setWidthInChars(6)
atom.config.set "editor.showInvisibles", true
@ -1600,11 +1600,11 @@ describe "EditorView", ->
expect(space).toBeTruthy()
eol = editorView.invisibles?.eol
expect(eol).toBeTruthy()
expect(editorView.renderedLines.find('.line:first').text()).toBe "a line#{space}"
expect(editorView.renderedLines.find('.line:last').text()).toBe "wraps#{eol}"
expect(editorView.renderedLines.find('.line:first').text()).toBe "a line "
expect(editorView.renderedLines.find('.line:last').text()).toBe "wraps#{space}#{eol}"
it "displays trailing carriage return using a visible non-empty value", ->
editor.setText "a line that\r\n"
editor.setText "a line that \r\n"
editorView.attachToDom()
editorView.setWidthInChars(6)
atom.config.set "editor.showInvisibles", true
@ -1614,8 +1614,8 @@ describe "EditorView", ->
expect(cr).toBeTruthy()
eol = editorView.invisibles?.eol
expect(eol).toBeTruthy()
expect(editorView.renderedLines.find('.line:first').text()).toBe "a line#{space}"
expect(editorView.renderedLines.find('.line:eq(1)').text()).toBe "that#{cr}#{eol}"
expect(editorView.renderedLines.find('.line:first').text()).toBe "a line "
expect(editorView.renderedLines.find('.line:eq(1)').text()).toBe "that#{space}#{cr}#{eol}"
expect(editorView.renderedLines.find('.line:last').text()).toBe "#{eol}"
describe "when editor.showIndentGuide is set to true", ->