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") ||