Allow multiple bracket closing insertionss like {{{}}}
This commit is contained in:
parent
5ed0998ce7
commit
b126f5d314
1 changed files with 4 additions and 5 deletions
|
|
@ -45,15 +45,14 @@ var CstyleBehaviour = function () {
|
|||
if (!this.$matchTokenType(iterator.getCurrentToken() || "text", ["text"])) {
|
||||
// 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"]))
|
||||
if (!this.$matchTokenType(iterator.getCurrentToken() || "text", ["text", "paren.rparen"]))
|
||||
return false;
|
||||
}
|
||||
|
||||
// Don't insert in front of identifiers or brackets
|
||||
// Only insert in front of whitespace/comments
|
||||
iterator.stepForward();
|
||||
if (this.$matchTokenType(iterator.getCurrentToken() || "text", ["identifier", "paren.lparen"]))
|
||||
return false;
|
||||
return true;
|
||||
return iterator.getCurrentTokenRow() !== cursor.row ||
|
||||
this.$matchTokenType(iterator.getCurrentToken() || "text", ["text", "comment", "paren.rparen"]);
|
||||
};
|
||||
|
||||
CstyleBehaviour.$matchTokenType = function(token, types) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue