mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Assign ::hasInvisibleCharacters on Token shims
This commit is contained in:
@@ -155,6 +155,7 @@ class TokenizedLine
|
||||
when HardTab
|
||||
tokenProperties.isAtomic = true
|
||||
tokenProperties.bufferDelta = 1
|
||||
tokenProperties.hasInvisibleCharacters = true if @invisibles?.tab
|
||||
when PairedCharacter
|
||||
tokenProperties.isAtomic = true
|
||||
tokenProperties.hasPairedCharacter = true
|
||||
@@ -165,10 +166,12 @@ class TokenizedLine
|
||||
if offset < @firstNonWhitespaceIndex
|
||||
tokenProperties.firstNonWhitespaceIndex =
|
||||
Math.min(tokenProperties.value.length, @firstNonWhitespaceIndex - offset)
|
||||
tokenProperties.hasInvisibleCharacters = true if @invisibles?.space
|
||||
|
||||
if @lineEnding? and (offset + tokenProperties.value.length > @firstTrailingWhitespaceIndex)
|
||||
tokenProperties.firstTrailingWhitespaceIndex =
|
||||
Math.max(0, @firstTrailingWhitespaceIndex - offset)
|
||||
tokenProperties.hasInvisibleCharacters = true if @invisibles?.space
|
||||
|
||||
offset += tokenProperties.value.length
|
||||
|
||||
|
||||
Reference in New Issue
Block a user