From 228836447cc16cdecd867a24853ffba7cc6699d9 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Wed, 23 Apr 2014 16:54:40 -0600 Subject: [PATCH] Only render trailing whitespace indent guides on whitespace-only lines Fixes #1895 --- src/editor-view.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/editor-view.coffee b/src/editor-view.coffee index bb15805e1..45be2e1c4 100644 --- a/src/editor-view.coffee +++ b/src/editor-view.coffee @@ -1482,10 +1482,12 @@ class EditorView extends View html = @buildEmptyLineHtml(showIndentGuide, eolInvisibles, htmlEolInvisibles, indentation, editor, mini) line.push(html) if html else + firstTrailingWhitespacePosition = text.search(/\s*$/) + lineIsWhitespaceOnly = firstTrailingWhitespacePosition is 0 position = 0 for token in tokens @updateScopeStack(line, scopeStack, token.scopes) - hasIndentGuide = not mini and showIndentGuide + hasIndentGuide = not mini and showIndentGuide and lineIsWhitespaceOnly line.push(token.getValueAsHtml({invisibles, hasIndentGuide})) position += token.value.length