do not use id of placeholder text mode

This commit is contained in:
nightwing 2013-01-25 17:49:42 +04:00
commit 8551e0e043

View file

@ -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);