add timeout to highlight word

This commit is contained in:
nightwing 2012-05-03 18:08:06 +04:00
commit 81b87d5c60

View file

@ -509,8 +509,11 @@ var Editor = function(renderer, session) {
this.$updateHighlightActiveLine();
}
if (this.$highlightSelectedWord)
this.session.getMode().highlightSelection(this);
if (this.$highlightSelectedWord && !this.$wordHighlightTimer)
this.$wordHighlightTimer = setTimeout(function(self) {
self.session.$mode.highlightSelection(self);
self.$wordHighlightTimer = null;
}, 30, this);
};
/**