From e3eb51c135e53d3e275d0e998d8d7c5703db551e Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Fri, 11 Apr 2014 08:55:16 -0600 Subject: [PATCH] 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. --- spec/editor-view-spec.coffee | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/spec/editor-view-spec.coffee b/spec/editor-view-spec.coffee index f4069053a..8a1d99a94 100644 --- a/spec/editor-view-spec.coffee +++ b/spec/editor-view-spec.coffee @@ -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", ->