1
0
Fork 0
mirror of https://github.com/vim/vim synced 2025-03-22 09:45:11 +01:00
Commit graph

25 commits

Author SHA1 Message Date
Doug Kearns
93197fde0f
runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Problem:  The "*.*" browsefilter pattern only matches all files on
	  Windows (Daryl Lee)
Solution: Use "*" to filter on all platforms but keep "*.*" as the label
	  text on Windows. (Fixes , Doug Kearns)

The *.* browsefilter pattern used to match "All Files" on Windows is a
legacy of the DOS 8.3 filename wildcard matching algorithm.  For reasons
of backward compatibility this still works on Windows to match all
files, even those without an extension.

However, this pattern only matches filenames containing a dot on other
platforms.  This often makes files without an extension difficult to
access from the file dialog, e.g., "Makefile"

On Windows it is still standard practice to use "*.*" for the filter
label so ftplugins should use "All Files (*.*)" on Windows and "All
Files (*)" on other platforms.  This matches Vim's default browsefilter
values.

This commit also normalises the browsefilter conditional test to check
for the Win32 and GTK GUI features and an unset b:browsefilter.

closes: 

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-14 21:02:54 +01:00
dkearns
d08059ab48
runtime(ruby): Update ftplugin and omni-complete ()
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-01 18:58:57 +01:00
Christian Brabandt
f7ac0ef509
runtime: don't execute external commands when loading ftplugins
This is a followup to 816fbcc262 (patch
9.0.1833: [security] runtime file fixes)

It basically disables that external commands are run on loading of the
filetype plugin, **unless** the user has set the `g:plugin_exec = 1`
global variable in their configuration or for a specific filetype the
variable g:<filetype>_exec=1.

There are a few more plugins, that may execute system commands like
debchangelog, gitcommit, sh, racket, zsh, ps1 but those do at least
do not run those commands by default during loading of the filetype plugin
(there the command is mostly run as convenience for auto-completion or
to provide documentation lookup).

closes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Tim Pope <vim@tpope.org>
2023-09-06 20:41:25 +02:00
Anton Sharonov
67c951df4c
runtime(ftplugin): allow to exec if curdir is in PATH
In case the current directory is present as valid $PATH entry, it is OK
to call the program from it, even if vim curdir is in that same
directory.

(Without that patch, for instance, you will not be able to open .zip
files while your current directory is /bin)

closes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-05 21:04:44 +02:00
Anton Sharonov (ant0sha)
282a94be99
runtime: Fix problem of checking wrong cwd for ruby ftplugin ()
Co-authored-by: Anton Sharonov <anton.sharonov@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-04 22:21:00 +02:00
Doug Kearns
da16a1b471
runtime(ruby): Update syntax, indent and ftplugin files
While making changes to the ruby ftplugin, slightly change the exepath()
conditional from patch 9.0.1833 and move it after the :cd invocation.

closes: 12981
closes: 12994

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Tim Pope <code@tpope.net>
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2023-09-01 18:36:49 +02:00
Christian Brabandt
816fbcc262
patch 9.0.1833: [security] runtime file fixes
Problem:  runtime files may execute code in current dir
Solution: only execute, if not run from current directory

The perl, zig and ruby filetype plugins and the zip and gzip autoload
plugins may try to load malicious executable files from the current
working directory.  This is especially a problem on windows, where the
current directory is implicitly in your $PATH and windows may even run a
file with the extension `.bat` because of $PATHEXT.

So make sure that we are not trying to execute a file from the current
directory. If this would be the case, error out (for the zip and gzip)
plugins or silently do not run those commands (for the ftplugins).

This assumes, that only the current working directory is bad. For all
other directories, it is assumed that those directories were
intentionally set to the $PATH by the user.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-31 23:52:30 +02:00
Bram Moolenaar
46eea444d9 Update runtime files 2022-03-30 10:51:39 +01:00
Bram Moolenaar
4d8f476176 Update runtime files 2021-06-27 15:18:56 +02:00
Bram Moolenaar
2ed639abdc Update a few runtime files. 2019-12-09 23:11:18 +01:00
Bram Moolenaar
d09091d495 Update runtime files. 2019-01-17 16:07:22 +01:00
Bram Moolenaar
89bcfda683 Updated runtime files. Remove version checks for Vim older than 6.0. 2016-08-30 23:26:57 +02:00
Bram Moolenaar
ec7944aaf2 Update runtime files. 2013-06-12 21:29:15 +02:00
Bram Moolenaar
1d68952a3e Runtime file updates. 2010-05-28 20:54:39 +02:00
Bram Moolenaar
5c73622a90 Update runtime files. 2010-01-06 20:54:52 +01:00
Bram Moolenaar
446cb837a0 updated for version 7.2a 2008-06-24 21:56:24 +00:00
Bram Moolenaar
79166c430b updated for version 7.1b 2007-05-10 18:29:51 +00:00
Bram Moolenaar
756ec0f3c9 updated for version 7.1a 2007-05-05 17:59:48 +00:00
Bram Moolenaar
91170f8ae7 updated for version 7.0g04 2006-05-05 21:15:17 +00:00
Bram Moolenaar
c6249bb246 updated for version 7.0d05 2006-04-15 20:25:09 +00:00
Bram Moolenaar
9e54a0e753 updated for version 7.0d04 2006-04-14 20:42:25 +00:00
Bram Moolenaar
a5792f5890 updated for version 7.0158 2005-11-23 21:25:05 +00:00
Bram Moolenaar
d5cdbeb8dd updated for version 7.0155 2005-10-10 20:59:28 +00:00
Bram Moolenaar
60a795aad6 updated for version 7.0148 2005-09-16 21:55:43 +00:00
Bram Moolenaar
071d4279d6 updated for version 7.0001 2004-06-13 20:20:40 +00:00