From 588d9b97eb4255d4f0febb0c3ba5d5d03aa073e1 Mon Sep 17 00:00:00 2001 From: Ivan Zuzak Date: Wed, 11 Jun 2014 18:31:37 +0200 Subject: [PATCH] Unindent only if the tab is at the start of the line --- src/selection.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/selection.coffee b/src/selection.coffee index c04fc7231..3092617b4 100644 --- a/src/selection.coffee +++ b/src/selection.coffee @@ -495,7 +495,7 @@ class Selection extends Model outdentSelectedRows: -> [start, end] = @getBufferRowRange() buffer = @editor.buffer - leadingTabRegex = new RegExp("^ {1,#{@editor.getTabLength()}}|\t") + leadingTabRegex = new RegExp("^( {1,#{@editor.getTabLength()}}|\t)") for row in [start..end] if matchLength = buffer.lineForRow(row).match(leadingTabRegex)?[0].length buffer.delete [[row, 0], [row, matchLength]]