fix cstyle behaviour when inserting braces and doing a newline. Previous behaviour would not add a closing brace when no other opening brace was present

This commit is contained in:
Robert Krahn 2013-11-25 18:11:15 -08:00
commit 69b40db4f2

View file

@ -166,7 +166,7 @@ var CstyleBehaviour = function () {
}
var rightChar = line.substring(cursor.column, cursor.column + 1);
if (rightChar == '}' || closing !== "") {
var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
if (!openBracePos)
return null;