add timeout to highlight word
This commit is contained in:
parent
e664a3b738
commit
81b87d5c60
1 changed files with 5 additions and 2 deletions
|
|
@ -509,8 +509,11 @@ var Editor = function(renderer, session) {
|
||||||
this.$updateHighlightActiveLine();
|
this.$updateHighlightActiveLine();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.$highlightSelectedWord)
|
if (this.$highlightSelectedWord && !this.$wordHighlightTimer)
|
||||||
this.session.getMode().highlightSelection(this);
|
this.$wordHighlightTimer = setTimeout(function(self) {
|
||||||
|
self.session.$mode.highlightSelection(self);
|
||||||
|
self.$wordHighlightTimer = null;
|
||||||
|
}, 30, this);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue