Browse files

Small improvement about function removing itself.

  • Loading branch information...
1 parent cc538ad commit 7036ac9c41155340192b89ddf2e4e4586d368b06 @sergi sergi committed Feb 20, 2012
Showing with 2 additions and 3 deletions.
  1. +2 −3 client/ext/vim/vim.js
View
5 client/ext/vim/vim.js
@@ -142,11 +142,10 @@ module.exports = ext.register("ext/vim/vim", {
self.enable(VIM_ENABLED);
});
- var aofListener = function(e) {
+ ide.addEventListener("afteropenfile", function aofListener(e) {
self.enable(VIM_DEFERRED_ENABLED === true);
ide.removeEventListener("afteropenfile", aofListener);
- };
- ide.addEventListener("afteropenfile", aofListener);
+ });
ide.addEventListener("init.ext/settings/settings", function (e) {
e.ext.getHeading("Code Editor").appendChild(new apf.checkbox({

0 comments on commit 7036ac9

Please sign in to comment.