diff --git a/lib/ace/mode/behaviour/cstyle.js b/lib/ace/mode/behaviour/cstyle.js index 3781afe8..51cac0f1 100644 --- a/lib/ace/mode/behaviour/cstyle.js +++ b/lib/ace/mode/behaviour/cstyle.js @@ -48,8 +48,8 @@ var CstyleBehaviour = function () { // Don't insert in the middle of a keyword/identifier/lexical if (!this.$matchTokenType(iterator.getCurrentToken() || "text", ["text", "paren.rparen"])) { // Look ahead in case we're at the end of a token - iterator = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", ["text", "paren.rparen"])) + var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); + if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", ["text", "paren.rparen"])) return false; }