diff --git a/NEWS b/NEWS index 32d0fc39..845fdc39 100644 --- a/NEWS +++ b/NEWS @@ -1,8 +1,12 @@
2008-05-14:
* version 1.1
+ * try to add .exe automatically to filenames on windows, so :set editor=gvim -f
+ will automatically invoke gvim.exe (if it's in the path). Thanks to
+ Guido Van Hoecke
* readded visualbellstyle (thanks mauke)
* new popups=4 option
+ * many bug fixes as usual
2008-05-14:
* version 1.0
diff --git a/content/io.js b/content/io.js
index 7bca5902..f1638ce1 100644
--- a/content/io.js
+++ b/content/io.js
@@ -469,6 +469,19 @@ liberator.IO = function () //{{{
file.initWithPath(path);
if (file.exists())
break;
+
+ // automatically try to add common file extensions on windows
+ if (WINDOWS)
+ {
+ var extensions = [".exe", ".cmd", ".bat"];
+ for (let j = 0; j < extensions.length; j++)
+ {
+ path = dirs[i] + "\\" + program + extensions[j];
+ file.initWithPath(path);
+ if (file.exists())
+ break;
+ }
+ }
}
catch (e) { }
}