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(); 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);
}; };
/** /**