From 17cbe30053c88ab3170ed0059082cc914bd605f0 Mon Sep 17 00:00:00 2001 From: Viktor Kojouharov Date: Sat, 28 Apr 2007 10:15:14 +0000 Subject: [PATCH] delay sourcing of the rc file so that commands that open new tabs (like js!) can work --- chrome/content/vimperator/vimperator.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/chrome/content/vimperator/vimperator.js b/chrome/content/vimperator/vimperator.js index 0108f4c1..6b6bbaa7 100644 --- a/chrome/content/vimperator/vimperator.js +++ b/chrome/content/vimperator/vimperator.js @@ -247,10 +247,14 @@ function init() logMessage("Initialized"); - // at the very last, read a ~/.vimperatorrc - source("~/.vimperatorrc", true); - - logMessage("~/.vimperatorrc sourced"); + /* + * Finally, read a ~/.vimperatorrc + * Make sourcing asynchronous, otherwise commands that open new tabs won't work + */ + setTimeout(function() { + source("~/.vimperatorrc", true); + logMessage("~/.vimperatorrc sourced"); + }, 50); } function unload()