When project.showInvisibles is true; spaces, tabs and newlines are visible

This commit is contained in:
Corey Johnson
2012-10-11 11:47:55 -07:00
committed by Corey Johnson & Nathan Sobo
parent e2a917fcf3
commit 4478bbca9a
4 changed files with 40 additions and 18 deletions

View File

@@ -873,12 +873,13 @@ class Editor extends View
attributePairs.push "#{attributeName}=\"#{value}\"" for attributeName, value of lineAttributes
line.push("<pre #{attributePairs.join(' ')}>")
if screenLine.text == ''
line.push('&nbsp;')
else
for token in screenLine.tokens
updateScopeStack(token.scopes)
line.push(token.escapeValue())
for token in screenLine.tokens
updateScopeStack(token.scopes)
line.push(token.escapeValue(@activeEditSession.showInvisibles))
if @activeEditSession.showInvisibles
line.push("<pre class='invisible'>¬</pre>")
line.push('</pre>')
line.join('')