Allow additional indentation after line has been auto-indented

This commit is contained in:
Corey Johnson
2012-07-16 10:45:38 -07:00
parent 95c3ea1b74
commit ac04a8ed66
2 changed files with 15 additions and 2 deletions

View File

@@ -134,8 +134,11 @@ class EditSession
whitespaceMatch = @lineForBufferRow(@getCursorBufferPosition().row).match /^\s*$/
if @autoIndent and whitespaceMatch
indentation = @indentationForRow(@getCursorBufferPosition().row)
@getSelection().selectLine()
@insertText(indentation)
if indentation.length > whitespaceMatch[0].length
@getSelection().selectLine()
@insertText(indentation)
else
@insertText(@tabText)
else if @softTabs
@insertText(@tabText)
else