Skip to content

Commit e02454b

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents a38e374 + 2a94e98 commit e02454b

124 files changed

Lines changed: 3759 additions & 930 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CODEOWNERS_vim

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@ runtime/ftplugin/cs.vim @nickspoons
124124
runtime/ftplugin/csh.vim @dkearns
125125
runtime/ftplugin/css.vim @dkearns
126126
runtime/ftplugin/cucumber.vim @tpope
127+
runtime/ftplugin/debchangelog.vim @jamessan
128+
runtime/ftplugin/debcontrol.vim @jamessan
129+
runtime/ftplugin/debsources.vim @jamessan
127130
runtime/ftplugin/desktop.vim @e-kwsm
128131
runtime/ftplugin/dosbatch.vim @mrdubya
129132
runtime/ftplugin/eiffel.vim @dkearns
@@ -163,6 +166,8 @@ runtime/ftplugin/ishd.vim @dkearns
163166
runtime/ftplugin/j.vim @glts
164167
runtime/ftplugin/javascript.vim @dkearns
165168
runtime/ftplugin/javascriptreact.vim @dkearns
169+
runtime/ftplugin/json.vim @dbarnett
170+
runtime/ftplugin/json5.vim @dkearns
166171
runtime/ftplugin/jsonc.vim @izhakjakov
167172
runtime/ftplugin/julia.vim @carlobaldassi
168173
runtime/ftplugin/kconfig.vim @chrisbra
@@ -355,6 +360,12 @@ runtime/syntax/d.vim @JesseKPhillips
355360
runtime/syntax/dart.vim @pr3d4t0r
356361
runtime/syntax/datascript.vim @dpelle
357362
runtime/syntax/dcl.vim @cecamp
363+
runtime/syntax/deb822sources.vim @jamessan
364+
runtime/syntax/debchangelog.vim @jamessan
365+
runtime/syntax/debcontrol.vim @jamessan
366+
runtime/syntax/debcopyright.vim @jamessan
367+
runtime/syntax/debsources.vim @jamessan
368+
runtime/syntax/dep3patch.vim @jamessan
358369
runtime/syntax/desktop.vim @e-kwsm
359370
runtime/syntax/dosbatch.vim @mrdubya
360371
runtime/syntax/dosini.vim @xuhdev
@@ -477,6 +488,7 @@ runtime/syntax/scss.vim @tpope
477488
runtime/syntax/sdoc.vim @gpanders
478489
runtime/syntax/sed.vim @dkearns
479490
runtime/syntax/sh.vim @cecamp
491+
runtime/syntax/shared/debversions.vim @jamessan
480492
runtime/syntax/sm.vim @cecamp
481493
runtime/syntax/solidity.vim @cothi
482494
runtime/syntax/spec.vim @ignatenkobrain

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@ body:
99
value: |
1010
Thanks for reporting issues of MacVim!
1111
12-
If you want to report a security issue, instead of reporting it here
13-
you can alternatively disclose it on
14-
[huntr.dev](https://huntr.dev/bounties/disclose/?utm_campaign=macvim-dev%2Fmacvim&utm_medium=social&utm_source=github&target=https%3A%2F%2Fgithub.com%2Fmacvim-dev%2Fmacvim).
15-
They have rewards in the form of money, swag and CVEs.
12+
If you want to report a security issue, instead of reporting it here publicly, please disclose it using the steps listed at https://github.com/macvim-dev/macvim/security/policy.
1613
1714
To make it easier for us to help you please enter detailed information below.
1815
- type: textarea

SECURITY.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
## Reporting a vulnerability
44

5-
If you want to report a security issue, please use [huntr.dev](https://huntr.dev/bounties/disclose?target=https%3A%2F%2Fgithub.com%2Fvim%2Fvim) to privately disclose the issue to us.
6-
They also have rewards in the form of money, swag and CVEs.
5+
If you want to report a security issue, please privately disclose the issue to the vim-security mailing list
6+
7+
8+
This is a private list, read only by the maintainers, but anybody can post, after moderation.
79

810
**Please don't publicly disclose the issue until it has been addressed by us.**

runtime/autoload/dist/script.vim

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,14 @@ export def Exe2filetype(name: string, line1: string): string
217217
elseif name =~ '^\%(rexx\|regina\)\>'
218218
return 'rexx'
219219

220+
# Janet
221+
elseif name =~ '^janet\>'
222+
return 'janet'
223+
224+
# Dart
225+
elseif name =~ '^dart\>'
226+
return 'dart'
227+
220228
endif
221229

222230
return ''
@@ -361,7 +369,7 @@ def DetectFromText(line1: string)
361369

362370
# Strace
363371
# inaccurate fast match first, then use accurate slow match
364-
elseif (line1 =~ 'execve(' && line1 =~ '^[0-9:.]* *execve(')
372+
elseif (line1 =~ 'execve(' && line1 =~ '^[0-9:. ]*execve(')
365373
|| line1 =~ '^__libc_start_main'
366374
setl ft=strace
367375

runtime/autoload/dist/vim.vim

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
" Vim runtime support library,
2+
" runs the vim9 script version or legacy script version
3+
" on demand (mostly for Neovim compatability)
4+
"
5+
" Maintainer: The Vim Project <https://github.com/vim/vim>
6+
" Last Change: 2023 Nov 04
7+
8+
9+
" enable the zip and gzip plugin by default, if not set
10+
if !exists('g:zip_exec')
11+
let g:zip_exec = 1
12+
endif
13+
14+
if !exists('g:gzip_exec')
15+
let g:gzip_exec = 1
16+
endif
17+
18+
if !has('vim9script')
19+
function dist#vim#IsSafeExecutable(filetype, executable)
20+
let cwd = getcwd()
21+
return get(g:, a:filetype .. '_exec', get(g:, 'plugin_exec', 0)) &&
22+
\ (fnamemodify(exepath(a:executable), ':p:h') !=# cwd
23+
\ || (split($PATH, has('win32') ? ';' : ':')->index(cwd) != -1 &&
24+
\ cwd != '.'))
25+
endfunction
26+
27+
finish
28+
endif
29+
30+
def dist#vim#IsSafeExecutable(filetype: string, executable: string): bool
31+
return dist#vim9#IsSafeExecutable(filetype, executable)
32+
enddef

runtime/autoload/dist/vim9.vim

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
vim9script
2+
3+
# Vim runtime support library
4+
#
5+
# Maintainer: The Vim Project <https://github.com/vim/vim>
6+
# Last Change: 2023 Oct 25
7+
8+
export def IsSafeExecutable(filetype: string, executable: string): bool
9+
var cwd = getcwd()
10+
return get(g:, filetype .. '_exec', get(g:, 'plugin_exec', 0))
11+
&& (fnamemodify(exepath(executable), ':p:h') !=# cwd
12+
|| (split($PATH, has('win32') ? ';' : ':')->index(cwd) != -1
13+
&& cwd != '.'))
14+
enddef
15+
16+
# Uncomment this line to check for compilation errors early
17+
# defcompile

runtime/autoload/gzip.vim

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@ fun s:check(cmd)
1111
let name = substitute(a:cmd, '\(\S*\).*', '\1', '')
1212
if !exists("s:have_" . name)
1313
" safety check, don't execute anything from the current directory
14-
let s:tmp_cwd = getcwd()
15-
let f = (fnamemodify(exepath(name), ":p:h") !=# s:tmp_cwd
16-
\ || (index(split($PATH,has("win32")? ';' : ':'), s:tmp_cwd) != -1 && s:tmp_cwd != '.'))
17-
unlet s:tmp_cwd
14+
let f = dist#vim#IsSafeExecutable('gzip', name)
1815
if !f
1916
echoerr "Warning: NOT executing " .. name .. " from current directory!"
2017
endif

runtime/autoload/netrw.vim

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,7 +1166,6 @@ fun! netrw#Explore(indx,dosplit,style,...)
11661166
2match none
11671167
if exists("s:explore_match") | unlet s:explore_match | endif
11681168
if exists("s:explore_prvdir") | unlet s:explore_prvdir | endif
1169-
echo " "
11701169
" call Decho("cleared explore match list",'~'.expand("<slnum>"))
11711170
endif
11721171

@@ -5730,8 +5729,6 @@ fun! s:NetrwClearExplore()
57305729
if exists("w:netrw_explore_list") |unlet w:netrw_explore_list |endif
57315730
if exists("w:netrw_explore_bufnr") |unlet w:netrw_explore_bufnr |endif
57325731
" redraw!
5733-
echo " "
5734-
echo " "
57355732
" call Dret("s:NetrwClearExplore")
57365733
endfun
57375734

runtime/autoload/tar.vim

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
" tar.vim: Handles browsing tarfiles
22
" AUTOLOAD PORTION
3-
" Date: Jan 07, 2020
4-
" Version: 32
3+
" Date: Nov 05, 2023
4+
" Version: 32a (with modifications from the Vim Project)
55
" Maintainer: Charles E Campbell <[email protected]>
66
" License: Vim License (see vim's :help license)
77
"
@@ -22,7 +22,7 @@
2222
if &cp || exists("g:loaded_tar")
2323
finish
2424
endif
25-
let g:loaded_tar= "v32"
25+
let g:loaded_tar= "v32a"
2626
if v:version < 702
2727
echohl WarningMsg
2828
echo "***warning*** this version of tar needs vim 7.2"
@@ -208,7 +208,16 @@ fun! tar#Browse(tarfile)
208208
" call Dret("tar#Browse : a:tarfile<".a:tarfile.">")
209209
return
210210
endif
211-
if line("$") == curlast || ( line("$") == (curlast + 1) && getline("$") =~# '\c\%(warning\|error\|inappropriate\|unrecognized\)')
211+
" If there was an error message, the last line probably matches some keywords but
212+
" should also contain whitespace for readability. Make sure not to match a
213+
" filename that contains the keyword (error/warning/unrecognized/inappropriate, etc)
214+
"
215+
" FIXME:is this actually necessary? In case of an error, we should probably
216+
" have noticed in the if statement above since tar should have exited
217+
" with a non-zero exit code.
218+
if line("$") == curlast || ( line("$") == (curlast + 1) &&
219+
\ getline("$") =~# '\c\<\%(warning\|error\|inappropriate\|unrecognized\)\>' &&
220+
\ getline("$") =~ '\s' )
212221
redraw!
213222
echohl WarningMsg | echo "***warning*** (tar#Browse) ".a:tarfile." doesn't appear to be a tar file" | echohl None
214223
keepj sil! %d

runtime/autoload/zip.vim

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,10 @@ if !exists("g:zip_extractcmd")
5757
let g:zip_extractcmd= g:zip_unzipcmd
5858
endif
5959

60-
let s:tmp_cwd = getcwd()
61-
if (fnamemodify(exepath(g:zip_unzipcmd), ":p:h") ==# getcwd()
62-
\ && (index(split($PATH,has("win32")? ';' : ':'), s:tmp_cwd) == -1 || s:tmp_cwd == '.'))
63-
unlet s:tmp_cwd
60+
if !dist#vim#IsSafeExecutable('zip', g:zip_unzipcmd)
6461
echoerr "Warning: NOT executing " .. g:zip_unzipcmd .. " from current directory!"
6562
finish
6663
endif
67-
unlet s:tmp_cwd
6864

6965
" ----------------
7066
" Functions: {{{1

0 commit comments

Comments
 (0)