From 0b8ecb0d71a9faf4c5e39d41e5b2d057b23a4c03 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Mon, 2 Jul 2007 09:43:03 +0000 Subject: [PATCH] move global source() command to a vimperator slot --- chrome/content/vimperator/commands.js | 4 ++-- chrome/content/vimperator/vimperator.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/chrome/content/vimperator/commands.js b/chrome/content/vimperator/commands.js index 6449d5d8..36f6e89c 100644 --- a/chrome/content/vimperator/commands.js +++ b/chrome/content/vimperator/commands.js @@ -649,7 +649,7 @@ function Commands() //{{{ } )); addDefaultCommand(new Command(["so[urce]"], - source, + function(args) { vimperator.source(args); }, { usage: ["so[urce][!] {file}"], short_help: "Read Ex commands from {file}", @@ -1723,7 +1723,7 @@ function set(args, special) } } -function source(filename, silent) +Vimperator.prototype.source = function(filename, silent) { if (!filename) return; diff --git a/chrome/content/vimperator/vimperator.js b/chrome/content/vimperator/vimperator.js index 414d34cf..26f36342 100644 --- a/chrome/content/vimperator/vimperator.js +++ b/chrome/content/vimperator/vimperator.js @@ -126,7 +126,7 @@ function init() //{{{ // Finally, read a ~/.vimperatorrc // Make sourcing asynchronous, otherwise commands that open new tabs won't work setTimeout(function() { - source("~/.vimperatorrc", true); + vimperator.source("~/.vimperatorrc", true); vimperator.log("~/.vimperatorrc sourced", 1); }, 50);