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();
|
||||
}
|
||||
|
||||
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);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue