diff --git a/lib/ace/snippets.js b/lib/ace/snippets.js index ee1a5498..4418550d 100644 --- a/lib/ace/snippets.js +++ b/lib/ace/snippets.js @@ -329,8 +329,11 @@ var SnippetManager = function() { continue; var id = p.tabstopId; var i1 = tokens.indexOf(p, i + 1); - if (expanding[id] == p) { - expanding[id] = null; + if (expanding[id]) { + // if reached closing bracket clear expanding state + if (expanding[id] === p) + expanding[id] = null; + // otherwise just ignore recursive tabstop continue; }