diff --git a/spec/tokenized-buffer-spec.coffee b/spec/tokenized-buffer-spec.coffee index d21653a63..7dcaf4b94 100644 --- a/spec/tokenized-buffer-spec.coffee +++ b/spec/tokenized-buffer-spec.coffee @@ -344,6 +344,20 @@ describe "TokenizedBuffer", -> expect(tokenizedBuffer.lineForScreenRow(2).text).toBe "#{tabAsSpaces} buy()#{tabAsSpaces}while supply > demand" + it "aligns the hard tabs to the correct tab stop column", -> + buffer.setText """ + 1\t2 + 12\t3 + 123\t4 + """ + + tokenizedBuffer.setTabLength(4) + fullyTokenize(tokenizedBuffer) + + expect(tokenizedBuffer.lineForScreenRow(0).text).toBe "1 2" + expect(tokenizedBuffer.lineForScreenRow(1).text).toBe "12 3" + expect(tokenizedBuffer.lineForScreenRow(2).text).toBe "123 4" + describe "when the buffer contains surrogate pairs", -> beforeEach -> waitsForPromise ->