From 449abd73646af35e7ef4830450963ca1c2b7fb38 Mon Sep 17 00:00:00 2001 From: Michelle Tilley Date: Mon, 21 Mar 2016 16:27:41 -0700 Subject: [PATCH] Revert "Revert "Add spec for inserting white-space-only lines"" This reverts commit fd17457c172838c0a919ff74944ba68ab9770391. --- spec/selection-spec.coffee | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/spec/selection-spec.coffee b/spec/selection-spec.coffee index ec40e32cc..319e2d438 100644 --- a/spec/selection-spec.coffee +++ b/spec/selection-spec.coffee @@ -83,3 +83,11 @@ describe "Selection", -> selection.setBufferRange([[2, 0], [2, 10]]) selection.destroy() expect(selection.marker.isDestroyed()).toBeTruthy() + + describe ".insertText(text, options)", -> + it "allows pasting white space only lines when autoIndent is enabled", -> + selection.setBufferRange [[0, 0], [0, 0]] + selection.insertText(" \n \n\n", autoIndent: true) + expect(buffer.lineForRow(0)).toBe " " + expect(buffer.lineForRow(1)).toBe " " + expect(buffer.lineForRow(2)).toBe ""