Don’t break out soft tabs that are interrupted by a scope boundary

This commit is contained in:
Nathan Sobo
2015-06-08 22:56:18 +02:00
parent 21176f3cdc
commit 36d55c9384
2 changed files with 20 additions and 3 deletions

View File

@@ -102,10 +102,11 @@ class TokenizedLine
substringEnd += 1
else
if (screenColumn + 1) % @tabLength is 0
@specialTokens[tokenIndex] = SoftTab
suffix = @tags[tokenIndex] - @tabLength
@tags.splice(tokenIndex, 1, @tabLength)
@tags.splice(tokenIndex + 1, 0, suffix) if suffix > 0
if suffix >= 0
@specialTokens[tokenIndex] = SoftTab
@tags.splice(tokenIndex, 1, @tabLength)
@tags.splice(tokenIndex + 1, 0, suffix) if suffix > 0
if @invisibles?.space
if substringEnd > substringStart