always call setMode callback after the event
This commit is contained in:
parent
4d8a31fd54
commit
414667916e
1 changed files with 4 additions and 3 deletions
|
|
@ -886,8 +886,9 @@ var EditSession = function(text, mode) {
|
|||
this.$modes["ace/mode/text"] = new TextMode();
|
||||
|
||||
if (this.$modes[path] && !options) {
|
||||
cb && cb(this.mode);
|
||||
return this.$onChangeMode(this.$modes[path]);
|
||||
this.$onChangeMode(this.$modes[path]);
|
||||
cb && cb();
|
||||
return;
|
||||
}
|
||||
// load on demand
|
||||
this.$modeId = path;
|
||||
|
|
@ -903,7 +904,7 @@ var EditSession = function(text, mode) {
|
|||
m.$id = path;
|
||||
}
|
||||
this.$onChangeMode(m);
|
||||
cb && cb(this.mode);
|
||||
cb && cb();
|
||||
}
|
||||
}.bind(this));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue