aboutsummaryrefslogtreecommitdiffstats
path: root/lib/completion.js
diff options
context:
space:
mode:
authorPhil Crosby2012-05-04 23:09:04 -0700
committerPhil Crosby2012-05-05 18:32:13 -0700
commit238d7c86f4518331cf7563d6baf622401e07a59c (patch)
treef69a9e1343165f8203c3a7eb885d49714c1fd05b /lib/completion.js
parent55d13097c9ff8f6301a4bf64b42740ae5edcf71c (diff)
downloadvimium-238d7c86f4518331cf7563d6baf622401e07a59c.tar.bz2
use proxy instead of self
Diffstat (limited to 'lib/completion.js')
-rw-r--r--lib/completion.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/completion.js b/lib/completion.js
index 7e4bcf57..14c2dbe4 100644
--- a/lib/completion.js
+++ b/lib/completion.js
@@ -50,8 +50,7 @@ var completion = (function() {
},
filter: function(query, callback) {
- var self = this;
- var handler = function(results) { callback(self.processResults(query, results)); }
+ var handler = function(results) { callback(this.processResults(query, results)); }.proxy(this);
// are the results ready?
if (this.completions !== null) {
@@ -61,9 +60,9 @@ var completion = (function() {
// no: register the handler as a callback
this.resultsReady = function(results) {
handler(results);
- self.resultsReady = self.fallbackReadyCallback;
- self.resultsReady(results);
- }
+ this.resultsReady = this.fallbackReadyCallback;
+ this.resultsReady(results);
+ }.proxy(this);
}
}
});