summaryrefslogtreecommitdiffstats
path: root/src/dosinst.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dosinst.c')
-rw-r--r--src/dosinst.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/dosinst.c b/src/dosinst.c
index ef41081ef9..6dcb5e30db 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)
{