Inserting a newline before a top-level c-style statement (starting with a '{') no longer auto-indents it.

This commit is contained in:
Corey Johnson
2012-06-05 09:09:20 -07:00
parent 3c2facc7be
commit ce25b33c25

View File

@@ -136,7 +136,7 @@ class Selection extends View
mode = @editor.getCurrentMode()
row = @cursor.getScreenPosition().row
state = @editor.stateForScreenRow(row)
lineBeforeCursor = @cursor.getCurrentBufferLine()[0..@cursor.getBufferPosition().column]
lineBeforeCursor = @cursor.getCurrentBufferLine()[0...@cursor.getBufferPosition().column]
if text[0] == "\n"
indent = mode.getNextLineIndent(state, lineBeforeCursor, @editor.tabText)
text = text[0] + indent + text[1..]