mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Pass invisibles down to lines component
This commit is contained in:
@@ -31,7 +31,7 @@ EditorComponent = React.createClass
|
||||
mouseWheelScreenRow: null
|
||||
|
||||
render: ->
|
||||
{focused, fontSize, lineHeight, fontFamily, showIndentGuide} = @state
|
||||
{focused, fontSize, lineHeight, fontFamily, showIndentGuide, invisibles} = @state
|
||||
{editor, cursorBlinkResumeDelay} = @props
|
||||
maxLineNumberDigits = editor.getScreenLineCount().toString().length
|
||||
|
||||
@@ -62,7 +62,7 @@ EditorComponent = React.createClass
|
||||
lineHeight: lineHeightInPixels, renderedRowRange, @pendingChanges,
|
||||
scrollTop, scrollLeft, scrollHeight, scrollWidth, @scrollingVertically,
|
||||
@cursorsMoved, @selectionChanged, @selectionAdded, cursorBlinkResumeDelay,
|
||||
@onInputFocused, @onInputBlurred, @mouseWheelScreenRow
|
||||
@onInputFocused, @onInputBlurred, @mouseWheelScreenRow, invisibles
|
||||
}
|
||||
|
||||
ScrollbarComponent
|
||||
|
||||
@@ -16,7 +16,7 @@ EditorScrollViewComponent = React.createClass
|
||||
overflowChangedWhilePaused: false
|
||||
|
||||
render: ->
|
||||
{editor, fontSize, fontFamily, lineHeight, showIndentGuide} = @props
|
||||
{editor, fontSize, fontFamily, lineHeight, showIndentGuide, invisibles} = @props
|
||||
{renderedRowRange, pendingChanges, scrollTop, scrollLeft, scrollHeight, scrollWidth, scrollingVertically, mouseWheelScreenRow} = @props
|
||||
{selectionChanged, selectionAdded, cursorBlinkResumeDelay, cursorsMoved, onInputFocused, onInputBlurred} = @props
|
||||
|
||||
@@ -37,7 +37,7 @@ EditorScrollViewComponent = React.createClass
|
||||
LinesComponent {
|
||||
ref: 'lines', editor, fontSize, fontFamily, lineHeight, showIndentGuide,
|
||||
renderedRowRange, pendingChanges, scrollTop, scrollLeft, scrollingVertically,
|
||||
selectionChanged, scrollHeight, scrollWidth, mouseWheelScreenRow
|
||||
selectionChanged, scrollHeight, scrollWidth, mouseWheelScreenRow, invisibles
|
||||
}
|
||||
|
||||
componentDidMount: ->
|
||||
|
||||
@@ -135,17 +135,11 @@ LinesComponent = React.createClass
|
||||
" "
|
||||
|
||||
buildLineInnerHTML: (line) ->
|
||||
{invisibles, mini, showIndentGuide} = @props
|
||||
{invisibles, mini, showIndentGuide, invisibles} = @props
|
||||
{tokens, text} = line
|
||||
innerHTML = ""
|
||||
|
||||
scopeStack = []
|
||||
invisibles =
|
||||
eol: '\u00ac'
|
||||
space: '\u00b7'
|
||||
tab: '\u00bb'
|
||||
cr: '\u00a4'
|
||||
|
||||
firstTrailingWhitespacePosition = text.search(/\s*$/)
|
||||
lineIsWhitespaceOnly = firstTrailingWhitespacePosition is 0
|
||||
for token in tokens
|
||||
|
||||
Reference in New Issue
Block a user