Hitting tab on a line (containing only whitespace) will auto indent the line and set the cursor to the end

This commit is contained in:
Corey Johnson
2012-07-16 10:25:28 -07:00
parent e089b74867
commit 5184b90365
3 changed files with 33 additions and 7 deletions

View File

@@ -48,6 +48,11 @@ class TokenizedBuffer
else
null
indentationForRow: (row) ->
state = @stateForRow(row)
previousRowText = @buffer.lineForRow(row - 1)
@aceMode.getNextLineIndent(state, previousRowText, @tabText)
autoIndentTextAfterBufferPosition: (text, bufferPosition) ->
{ row, column} = bufferPosition
state = @stateForRow(row)