diff --git a/lib/ace/editor.js b/lib/ace/editor.js index ac7c31ac..834e603a 100644 --- a/lib/ace/editor.js +++ b/lib/ace/editor.js @@ -509,8 +509,9 @@ var Editor = function(renderer, session) { this.$updateHighlightActiveLine(); } + var self = this; if (this.$highlightSelectedWord && !this.$wordHighlightTimer) - this.$wordHighlightTimer = setTimeout(function(self) { + this.$wordHighlightTimer = setTimeout(function() { self.session.$mode.highlightSelection(self); self.$wordHighlightTimer = null; }, 30, this);