           # Hide popup if more than 10 suggestions
           # TODO: Completions aren't asked for unless we show popup, so this is super hacky
           # TODO: Backspacing to yield more suggestions does not close popup
-          if editor.completer?.completions?.filtered?.length > 10
+          if editor.completer?.completions?.filtered?.length > 20
             editor.completer.detach()
 
           # Update popup CSS after it's been launched

              else 'while true'
          # For now, update autocomplete to use hero instead of self/this, if hero is already used in the source.
          # Later, we should make this happen all the time - or better yet update the snippets.
          source = spellView.getSource()
          if /hero/.test(source) or not /(self[\.\:]|this\.|\@)/.test(source)
            thisToken =
              'python': /self/,


  addCodeCombatSnippets: (level, spellView, e) ->
    snippetEntries = []
    source = spellView.getSource()
    haveFindNearestEnemy = false
    haveFindNearest = false
    for group, props of e.propGroups
