diff options
author | Bram Moolenaar <Bram@vim.org> | 2010-07-31 20:53:54 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2010-07-31 20:53:54 +0200 |
commit | 7805004319691ee026342525e0bf9df146358dc0 (patch) | |
tree | 2673ca28b85ecbcbea6f134c29167331612bbb01 /src/dosinst.c | |
parent | ca8a4dfe7aa94dc3285a0f834c472c07358fddb0 (diff) | |
download | vim-git-7805004319691ee026342525e0bf9df146358dc0.tar.gz |
Fix: on MS-Windows the "open with..." menu starts Vim without a file.
Diffstat (limited to 'src/dosinst.c')
-rw-r--r-- | src/dosinst.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/dosinst.c b/src/dosinst.c index ef41081ef..6dcb5e30d 100644 --- a/src/dosinst.c +++ b/src/dosinst.c @@ -1468,11 +1468,15 @@ register_openwith( HKEY hRootKey, const char *exe_path) { - LONG lRet = reg_create_key_and_value( + char exe_cmd[BUFSIZE]; + LONG lRet; + + sprintf(exe_cmd, "%s \"%%1\"", exe_path); + lRet = reg_create_key_and_value( hRootKey, "Applications\\gvim.exe\\shell\\edit\\command", NULL, - exe_path); + exe_cmd); if (ERROR_SUCCESS == lRet) { |