always call callback from setMode
This commit is contained in:
parent
2c9dbced9b
commit
fbdcbd00a1
1 changed files with 3 additions and 2 deletions
|
|
@ -885,9 +885,10 @@ var EditSession = function(text, mode) {
|
||||||
if (!this.$modes["ace/mode/text"])
|
if (!this.$modes["ace/mode/text"])
|
||||||
this.$modes["ace/mode/text"] = new TextMode();
|
this.$modes["ace/mode/text"] = new TextMode();
|
||||||
|
|
||||||
if (this.$modes[path] && !options)
|
if (this.$modes[path] && !options) {
|
||||||
|
cb && cb(this.mode);
|
||||||
return this.$onChangeMode(this.$modes[path]);
|
return this.$onChangeMode(this.$modes[path]);
|
||||||
|
}
|
||||||
// load on demand
|
// load on demand
|
||||||
this.$modeId = path;
|
this.$modeId = path;
|
||||||
config.loadModule(["mode", path], function(m) {
|
config.loadModule(["mode", path], function(m) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue