From 7374bda39bba4c13617906dc749325f68e515ddf Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Tue, 25 Sep 2007 19:37:09 +0000 Subject: [PATCH] merge new VIMPERATOR_HOME env variable support --- AUTHORS | 1 + chrome/content/vimperator/vimperator.js | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/AUTHORS b/AUTHORS index 6efbeec8..2f7b69c4 100644 --- a/AUTHORS +++ b/AUTHORS @@ -13,4 +13,5 @@ Patches: * Bart Trojanowski (Makefile) * Hannes Rist (:set titlestring support) * Marco Candrian (shift-insert patch) + * Nikolai Weibull ($VIMPERATOR_HOME) diff --git a/chrome/content/vimperator/vimperator.js b/chrome/content/vimperator/vimperator.js index ed1d9a0a..6d192f4d 100644 --- a/chrome/content/vimperator/vimperator.js +++ b/chrome/content/vimperator/vimperator.js @@ -112,10 +112,13 @@ const vimperator = (function() //{{{ if (WINDOWS) path = path.replace('/', '\\', 'g'); - // expand "~" to HOME (USERPROFILE or HOMEDRIVE\HOMEPATH on Windows if HOME is not set) + // expand "~" to VIMPERATOR_HOME or HOME (USERPROFILE or HOMEDRIVE\HOMEPATH on Windows if HOME is not set) if (/^~/.test(path)) { - var home = environment_service.get("HOME"); + var home = environment_service.get("VIMPERATOR_HOME"); + + if (!home) + home = environment_service.get("HOME"); if (WINDOWS && !home) home = environment_service.get("USERPROFILE") ||