This commit is contained in:
Antonio Scandurra 2015-10-06 11:02:36 +02:00
parent e8387e0095
commit 428f0db75b
3 changed files with 0 additions and 14 deletions

View File

@ -143,16 +143,6 @@ describe "DisplayBuffer", ->
expect(displayBuffer.tokenizedLineForScreenRow(3).tokens[1].isHardTab).toBeTruthy() expect(displayBuffer.tokenizedLineForScreenRow(3).tokens[1].isHardTab).toBeTruthy()
describe "when a line is wrapped", -> describe "when a line is wrapped", ->
it "marks it as soft-wrapped", ->
displayBuffer.setEditorWidthInChars(7)
expect(displayBuffer.tokenizedLineForScreenRow(0).softWrapped).toBeFalsy()
expect(displayBuffer.tokenizedLineForScreenRow(1).softWrapped).toBeTruthy()
expect(displayBuffer.tokenizedLineForScreenRow(2).softWrapped).toBeTruthy()
expect(displayBuffer.tokenizedLineForScreenRow(3).softWrapped).toBeTruthy()
expect(displayBuffer.tokenizedLineForScreenRow(4).softWrapped).toBeTruthy()
expect(displayBuffer.tokenizedLineForScreenRow(5).softWrapped).toBeFalsy()
it "breaks soft-wrap indentation into a token for each indentation level to support indent guides", -> it "breaks soft-wrap indentation into a token for each indentation level to support indent guides", ->
tokenizedLine = displayBuffer.tokenizedLineForScreenRow(4) tokenizedLine = displayBuffer.tokenizedLineForScreenRow(4)

View File

@ -677,7 +677,6 @@ class TextEditorPresenter
screenRow = startRow + i screenRow = startRow + i
line = @model.tokenizedLineForScreenRow(screenRow) line = @model.tokenizedLineForScreenRow(screenRow)
softWrapped = line.softWrapped
decorationClasses = @lineNumberDecorationClassesForRow(screenRow) decorationClasses = @lineNumberDecorationClassesForRow(screenRow)
foldable = @model.isFoldableAtScreenRow(screenRow) foldable = @model.isFoldableAtScreenRow(screenRow)

View File

@ -34,7 +34,6 @@ class TokenizedLine
lineIsWhitespaceOnly: false lineIsWhitespaceOnly: false
firstNonWhitespaceIndex: 0 firstNonWhitespaceIndex: 0
foldable: false foldable: false
softWrapped: false
constructor: (properties) -> constructor: (properties) ->
@id = idCounter++ @id = idCounter++
@ -421,7 +420,6 @@ class TokenizedLine
leftFragment.tabLength = @tabLength leftFragment.tabLength = @tabLength
leftFragment.firstNonWhitespaceIndex = Math.min(column, @firstNonWhitespaceIndex) leftFragment.firstNonWhitespaceIndex = Math.min(column, @firstNonWhitespaceIndex)
leftFragment.firstTrailingWhitespaceIndex = Math.min(column, @firstTrailingWhitespaceIndex) leftFragment.firstTrailingWhitespaceIndex = Math.min(column, @firstTrailingWhitespaceIndex)
leftFragment.softWrapped = @softWrapped
rightFragment = new TokenizedLine rightFragment = new TokenizedLine
rightFragment.tokenIterator = @tokenIterator rightFragment.tokenIterator = @tokenIterator
@ -439,7 +437,6 @@ class TokenizedLine
rightFragment.endOfLineInvisibles = @endOfLineInvisibles rightFragment.endOfLineInvisibles = @endOfLineInvisibles
rightFragment.firstNonWhitespaceIndex = Math.max(softWrapIndent, @firstNonWhitespaceIndex - column + softWrapIndent) rightFragment.firstNonWhitespaceIndex = Math.max(softWrapIndent, @firstNonWhitespaceIndex - column + softWrapIndent)
rightFragment.firstTrailingWhitespaceIndex = Math.max(softWrapIndent, @firstTrailingWhitespaceIndex - column + softWrapIndent) rightFragment.firstTrailingWhitespaceIndex = Math.max(softWrapIndent, @firstTrailingWhitespaceIndex - column + softWrapIndent)
rightFragment.softWrapped = true
[leftFragment, rightFragment] [leftFragment, rightFragment]