mirror of
https://github.com/atom/atom.git
synced 2026-01-23 13:58:08 -05:00
Only render trailing whitespace indent guides on whitespace-only lines
Fixes #1895
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user