don't set the mode it is already set
This commit is contained in:
parent
75da4b7225
commit
f440fb8e0e
1 changed files with 3 additions and 1 deletions
|
|
@ -145,7 +145,7 @@ var Editor = function(renderer, doc) {
|
||||||
this.setTheme = function(theme) {
|
this.setTheme = function(theme) {
|
||||||
this.renderer.setTheme(theme);
|
this.renderer.setTheme(theme);
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$highlightBrackets = function() {
|
this.$highlightBrackets = function() {
|
||||||
if (this.$bracketHighlight) {
|
if (this.$bracketHighlight) {
|
||||||
this.renderer.removeMarker(this.$bracketHighlight);
|
this.renderer.removeMarker(this.$bracketHighlight);
|
||||||
|
|
@ -246,6 +246,8 @@ var Editor = function(renderer, doc) {
|
||||||
|
|
||||||
this.onDocumentModeChange = function() {
|
this.onDocumentModeChange = function() {
|
||||||
var mode = this.doc.getMode();
|
var mode = this.doc.getMode();
|
||||||
|
if (this.mode == mode)
|
||||||
|
return;
|
||||||
|
|
||||||
this.mode = mode;
|
this.mode = mode;
|
||||||
var tokenizer = mode.getTokenizer();
|
var tokenizer = mode.getTokenizer();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue