Avoid getitng null token at end of line
This commit is contained in:
parent
67fe548347
commit
b2ce75f95b
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue