mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
✅ Check leading spaces as well
This commit is contained in:
@@ -128,8 +128,15 @@ describe "DisplayBuffer", ->
|
||||
expect(displayBuffer.tokenizedLineForScreenRow(4).tokens[0].isSoftWrapIndentation).toBeTruthy()
|
||||
expect(displayBuffer.tokenizedLineForScreenRow(4).tokens[1].isSoftWrapIndentation).toBeTruthy()
|
||||
|
||||
describe "when editor.softWrapHangingIndentationSpaces is set", ->
|
||||
beforeEach ->
|
||||
atom.config.set('editor.softWrapHangingIndentationSpaces', 3)
|
||||
|
||||
it "further indents wrapped lines", ->
|
||||
expect(displayBuffer.tokenizedLineForScreenRow(11).text).toBe " sort(left).concat(pivot).concat(sort(right)"
|
||||
expect(displayBuffer.tokenizedLineForScreenRow(12).text).toBe " );"
|
||||
|
||||
it "correctly tokenizes hanging indentation spaces", ->
|
||||
atom.config.set("editor.softWrapHangingIndentationSpaces", 3)
|
||||
expect(displayBuffer.tokenizedLineForScreenRow(4).tokens[0].isSoftWrapIndentation).toBeTruthy()
|
||||
expect(displayBuffer.tokenizedLineForScreenRow(4).tokens[1].isSoftWrapIndentation).toBeTruthy()
|
||||
expect(displayBuffer.tokenizedLineForScreenRow(4).tokens[2].isSoftWrapIndentation).toBeTruthy()
|
||||
|
||||
Reference in New Issue
Block a user