From 6ac8af2a6e7799cbf72e2fc6998f9329159e40d0 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Tue, 17 Mar 2015 22:58:14 +0100 Subject: [PATCH] :white_check_mark: Check leading spaces as well --- spec/display-buffer-spec.coffee | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/spec/display-buffer-spec.coffee b/spec/display-buffer-spec.coffee index 5a719198d..1306174aa 100644 --- a/spec/display-buffer-spec.coffee +++ b/spec/display-buffer-spec.coffee @@ -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()