🐎 Mark soft-wrapped lines in TokenizedLine

This commit is contained in:
Antonio Scandurra
2015-10-01 11:15:55 +02:00
parent 243dea1a1c
commit 116f92d816
3 changed files with 19 additions and 11 deletions

View File

@@ -143,6 +143,16 @@ describe "DisplayBuffer", ->
expect(displayBuffer.tokenizedLineForScreenRow(3).tokens[1].isHardTab).toBeTruthy()
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", ->
tokenizedLine = displayBuffer.tokenizedLineForScreenRow(4)