Fix: on MS-Windows the "open with..." menu starts Vim without a file.

This commit is contained in:
Bram Moolenaar
2010-07-31 20:53:54 +02:00
parent ca8a4dfe7a
commit 7805004319
2 changed files with 8 additions and 5 deletions

View File

@ -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)
{