From 8551e0e043a3938c1ebba85c1dbcfdcbc5ce359e Mon Sep 17 00:00:00 2001 From: nightwing Date: Fri, 25 Jan 2013 17:49:42 +0400 Subject: [PATCH] do not use id of placeholder text mode --- lib/ace/edit_session.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ace/edit_session.js b/lib/ace/edit_session.js index 21f9ec20..9ac41352 100644 --- a/lib/ace/edit_session.js +++ b/lib/ace/edit_session.js @@ -949,7 +949,6 @@ var EditSession = function(text, mode) { this.$onChangeMode = function(mode, $isPlaceholder) { if (this.$mode === mode) return; this.$mode = mode; - this.$modeId = mode.$id; this.$stopWorker(); @@ -980,6 +979,7 @@ var EditSession = function(text, mode) { if (!$isPlaceholder) { + this.$modeId = mode.$id; this.$setFolding(mode.foldingRules); this._emit("changeMode"); this.bgTokenizer.start(0);