Merge pull request #2315 from amankr/autocomplete2

Autocomplete bug fix #2233 - method 2

Thanks @amankr!
This commit is contained in:
Matt Lott 2015-02-13 13:12:22 -08:00
commit 81678e81d9

View file

@ -443,6 +443,7 @@ module.exports = class SpellView extends CocoView
# window.snippetEntries = snippetEntries
lang = SpellView.editModes[e.language].substr 'ace/mode/'.length
@zatanna.addSnippets snippetEntries, lang
@editorLang = lang
onMultiplayerChanged: ->
if @session.get('multiplayer')
@ -1091,6 +1092,7 @@ module.exports = class SpellView extends CocoView
@destroyAceEditor(@ace)
@debugView?.destroy()
@toolbarView?.destroy()
@zatanna.addSnippets [], @editorLang if @editorLang?
$(window).off 'resize', @onWindowResize
super()