From 80fb1247724c94a310246b9ddeb393d00482b841 Mon Sep 17 00:00:00 2001 From: Aman Kumar Date: Sat, 14 Feb 2015 01:56:05 +0530 Subject: [PATCH 1/3] Autocomplete bug fix #2233 --- app/views/play/level/tome/SpellView.coffee | 1 + 1 file changed, 1 insertion(+) diff --git a/app/views/play/level/tome/SpellView.coffee b/app/views/play/level/tome/SpellView.coffee index 861ee31d3..735c12ab3 100644 --- a/app/views/play/level/tome/SpellView.coffee +++ b/app/views/play/level/tome/SpellView.coffee @@ -1091,6 +1091,7 @@ module.exports = class SpellView extends CocoView @destroyAceEditor(@ace) @debugView?.destroy() @toolbarView?.destroy() + @zatanna.addSnippets [], @spell.language $(window).off 'resize', @onWindowResize super() From 224213ccb0b4518550a9a0d7002a819b96aaefb8 Mon Sep 17 00:00:00 2001 From: Aman Kumar Date: Sat, 14 Feb 2015 02:11:00 +0530 Subject: [PATCH 2/3] Autocomplete bug fix #2233 --- app/views/play/level/tome/SpellView.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/play/level/tome/SpellView.coffee b/app/views/play/level/tome/SpellView.coffee index 735c12ab3..fdf9aae33 100644 --- a/app/views/play/level/tome/SpellView.coffee +++ b/app/views/play/level/tome/SpellView.coffee @@ -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 + @newlang = lang onMultiplayerChanged: -> if @session.get('multiplayer') @@ -1091,7 +1092,7 @@ module.exports = class SpellView extends CocoView @destroyAceEditor(@ace) @debugView?.destroy() @toolbarView?.destroy() - @zatanna.addSnippets [], @spell.language + @zatanna.addSnippets [], @newlang if @newlang? $(window).off 'resize', @onWindowResize super() From 85a024546be6cf9bece0ce1c13acc8dcb518fb71 Mon Sep 17 00:00:00 2001 From: Aman Kumar Date: Sat, 14 Feb 2015 02:21:54 +0530 Subject: [PATCH 3/3] Autocomplete bug fix #2233 --- app/views/play/level/tome/SpellView.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/play/level/tome/SpellView.coffee b/app/views/play/level/tome/SpellView.coffee index fdf9aae33..a921770eb 100644 --- a/app/views/play/level/tome/SpellView.coffee +++ b/app/views/play/level/tome/SpellView.coffee @@ -443,7 +443,7 @@ module.exports = class SpellView extends CocoView # window.snippetEntries = snippetEntries lang = SpellView.editModes[e.language].substr 'ace/mode/'.length @zatanna.addSnippets snippetEntries, lang - @newlang = lang + @editorLang = lang onMultiplayerChanged: -> if @session.get('multiplayer') @@ -1092,7 +1092,7 @@ module.exports = class SpellView extends CocoView @destroyAceEditor(@ace) @debugView?.destroy() @toolbarView?.destroy() - @zatanna.addSnippets [], @newlang if @newlang? + @zatanna.addSnippets [], @editorLang if @editorLang? $(window).off 'resize', @onWindowResize super()