mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-25 10:15:46 +01:00
merge new VIMPERATOR_HOME env variable support
This commit is contained in:
1
AUTHORS
1
AUTHORS
@@ -13,4 +13,5 @@ Patches:
|
|||||||
* Bart Trojanowski (Makefile)
|
* Bart Trojanowski (Makefile)
|
||||||
* Hannes Rist (:set titlestring support)
|
* Hannes Rist (:set titlestring support)
|
||||||
* Marco Candrian (shift-insert patch)
|
* Marco Candrian (shift-insert patch)
|
||||||
|
* Nikolai Weibull ($VIMPERATOR_HOME)
|
||||||
</pre>
|
</pre>
|
||||||
|
|||||||
@@ -112,10 +112,13 @@ const vimperator = (function() //{{{
|
|||||||
if (WINDOWS)
|
if (WINDOWS)
|
||||||
path = path.replace('/', '\\', 'g');
|
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))
|
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)
|
if (WINDOWS && !home)
|
||||||
home = environment_service.get("USERPROFILE") ||
|
home = environment_service.get("USERPROFILE") ||
|
||||||
|
|||||||
Reference in New Issue
Block a user