store reference to the matching brace highlight marker in the session
This commit is contained in:
parent
7633a665ac
commit
ba244bce0a
1 changed files with 4 additions and 4 deletions
|
|
@ -219,9 +219,9 @@ var Editor =function(renderer, session) {
|
|||
}
|
||||
|
||||
this.$highlightBrackets = function() {
|
||||
if (this.$bracketHighlight) {
|
||||
this.session.removeMarker(this.$bracketHighlight);
|
||||
this.$bracketHighlight = null;
|
||||
if (this.session.$bracketHighlight) {
|
||||
this.session.removeMarker(this.session.$bracketHighlight);
|
||||
this.session.$bracketHighlight = null;
|
||||
}
|
||||
|
||||
if (this.$highlightPending) {
|
||||
|
|
@ -237,7 +237,7 @@ var Editor =function(renderer, session) {
|
|||
var pos = self.session.findMatchingBracket(self.getCursorPosition());
|
||||
if (pos) {
|
||||
var range = new Range(pos.row, pos.column, pos.row, pos.column+1);
|
||||
self.$bracketHighlight = self.session.addMarker(range, "ace_bracket");
|
||||
self.session.$bracketHighlight = self.session.addMarker(range, "ace_bracket");
|
||||
}
|
||||
}, 10);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue