Skip to content

Commit 4177195

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents d8df8bb + e83c133 commit 4177195

172 files changed

Lines changed: 8576 additions & 2524 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.

.appveyor.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,10 @@ test_script:
2929
# Testing with MSVC console version
3030
- nmake -f Make_mvc.mak VIMPROG=..\vim
3131

32+
artifacts:
33+
- path: src/vim.exe
34+
name: vim
35+
- path: src/gvim.exe
36+
name: gvim
37+
3238
# vim: sw=2 sts=2 et ts=8 sr

.github/CODEOWNERS_vim

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ runtime/compiler/dartanalyser.vim @dkearns
5151
runtime/compiler/dartdevc.vim @dkearns
5252
runtime/compiler/dartdoc.vim @dkearns
5353
runtime/compiler/dartfmt.vim @dkearns
54+
runtime/compiler/dotnet.vim @nickspoons
5455
runtime/compiler/eruby.vim @dkearns
5556
runtime/compiler/fbc.vim @dkearns
5657
runtime/compiler/gawk.vim @dkearns
@@ -181,6 +182,7 @@ runtime/ftplugin/python.vim @tpict
181182
runtime/ftplugin/qb64.vim @dkearns
182183
runtime/ftplugin/r.vim @jalvesaq
183184
runtime/ftplugin/racket.vim @benknoble
185+
runtime/ftplugin/readline.vim @dkearns
184186
runtime/ftplugin/rhelp.vim @jalvesaq
185187
runtime/ftplugin/rmd.vim @jalvesaq
186188
runtime/ftplugin/rnoweb.vim @jalvesaq
@@ -297,6 +299,7 @@ runtime/plugin/tarPlugin.vim @cecamp
297299
runtime/plugin/vimballPlugin.vim @cecamp
298300
runtime/plugin/zipPlugin.vim @cecamp
299301
runtime/plugin/manpager.vim @Konfekt
302+
runtime/syntax/shared/hgcommitDiff.vim @vegerot
300303
runtime/syntax/abaqus.vim @costerwi
301304
runtime/syntax/aidl.vim @dpelle
302305
runtime/syntax/amiga.vim @cecamp
@@ -394,6 +397,7 @@ runtime/syntax/n1ql.vim @pr3d4t0r
394397
runtime/syntax/netrw.vim @cecamp
395398
runtime/syntax/nginx.vim @chr4
396399
runtime/syntax/ninja.vim @nico
400+
runtime/syntax/nix.vim @equill
397401
runtime/syntax/nroff.vim @jmarshall
398402
runtime/syntax/nsis.vim @k-takata
399403
runtime/syntax/openvpn.vim @ObserverOfTime
@@ -464,6 +468,7 @@ runtime/syntax/vdf.vim @ObserverOfTime
464468
runtime/syntax/vim.vim @cecamp
465469
runtime/syntax/vroom.vim @dbarnett
466470
runtime/syntax/wast.vim @rhysd
471+
runtime/syntax/wdl.vim @zenmatic
467472
runtime/syntax/wget.vim @dkearns
468473
runtime/syntax/wget2.vim @dkearns
469474
runtime/syntax/xbl.vim @dkearns

README.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ encouraged to make a donation to help orphans in Uganda. Please read the file
8484

8585
Summary of the license: There are no restrictions on using or distributing an
8686
unmodified copy of Vim. Parts of Vim may also be distributed, but the license
87-
text must always be included. For modified versions a few restrictions apply.
87+
text must always be included. For modified versions, a few restrictions apply.
8888
The license is GPL compatible, you may compile Vim with GPL libraries and
8989
distribute it.
9090

@@ -106,7 +106,7 @@ For the most recent information about sponsoring look on the Vim web site:
106106

107107
CONTRIBUTING
108108

109-
If you would like to help making Vim better, see the CONTRIBUTING.md file.
109+
If you would like to help make Vim better, see the CONTRIBUTING.md file.
110110

111111

112112
INFORMATION

README_vim.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ for details (do `:help uganda` inside Vim).
101101

102102
Summary of the license: There are no restrictions on using or distributing an
103103
unmodified copy of Vim. Parts of Vim may also be distributed, but the license
104-
text must always be included. For modified versions a few restrictions apply.
104+
text must always be included. For modified versions, a few restrictions apply.
105105
The license is GPL compatible, you may compile Vim with GPL libraries and
106106
distribute it.
107107

@@ -122,7 +122,7 @@ For the most recent information about sponsoring look on the Vim web site:
122122

123123
## Contributing ##
124124

125-
If you would like to help making Vim better, see the
125+
If you would like to help make Vim better, see the
126126
[CONTRIBUTING.md](/CONTRIBUTING.md) file.
127127

128128

runtime/autoload/dist/ft.vim

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ vim9script
33
# Vim functions for file type detection
44
#
55
# Maintainer: Bram Moolenaar <[email protected]>
6-
# Last Change: 2022 Nov 24
6+
# Last Change: 2022 Dec 14
77

88
# These functions are moved here from runtime/filetype.vim to make startup
99
# faster.
@@ -810,10 +810,13 @@ export def SQL()
810810
enddef
811811

812812
# This function checks the first 25 lines of file extension "sc" to resolve
813-
# detection between scala and SuperCollider
813+
# detection between scala and SuperCollider.
814+
# NOTE: We don't check for 'Class : Method', as this can easily be confused
815+
# with valid Scala like `val x : Int = 3`. So we instead only rely on
816+
# checks that can't be confused.
814817
export def FTsc()
815818
for lnum in range(1, min([line("$"), 25]))
816-
if getline(lnum) =~# '[A-Za-z0-9]*\s:\s[A-Za-z0-9]\|var\s<\|classvar\s<\|\^this.*\||\w*|\|+\s\w*\s{\|\*ar\s'
819+
if getline(lnum) =~# 'var\s<\|classvar\s<\|\^this.*\||\w\+|\|+\s\w*\s{\|\*ar\s'
817820
setf supercollider
818821
return
819822
endif

runtime/autoload/zig/fmt.vim

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
" Adapted from fatih/vim-go: autoload/go/fmt.vim
2+
"
3+
" Copyright 2011 The Go Authors. All rights reserved.
4+
" Use of this source code is governed by a BSD-style
5+
" license that can be found in the LICENSE file.
6+
"
7+
" Upstream: https://github.com/ziglang/zig.vim
8+
9+
function! zig#fmt#Format() abort
10+
" Save cursor position and many other things.
11+
let view = winsaveview()
12+
13+
if !executable('zig')
14+
echohl Error | echomsg "no zig binary found in PATH" | echohl None
15+
return
16+
endif
17+
18+
let cmdline = 'zig fmt --stdin --ast-check'
19+
let current_buf = bufnr('')
20+
21+
" The formatted code is output on stdout, the errors go on stderr.
22+
if exists('*systemlist')
23+
silent let out = systemlist(cmdline, current_buf)
24+
else
25+
silent let out = split(system(cmdline, current_buf))
26+
endif
27+
if len(out) == 1
28+
if out[0] == "error: unrecognized parameter: '--ast-check'"
29+
let cmdline = 'zig fmt --stdin'
30+
if exists('*systemlist')
31+
silent let out = systemlist(cmdline, current_buf)
32+
else
33+
silent let out = split(system(cmdline, current_buf))
34+
endif
35+
endif
36+
endif
37+
let err = v:shell_error
38+
39+
40+
if err == 0
41+
" remove undo point caused via BufWritePre.
42+
try | silent undojoin | catch | endtry
43+
44+
" Replace the file content with the formatted version.
45+
if exists('*deletebufline')
46+
call deletebufline(current_buf, len(out), line('$'))
47+
else
48+
silent execute ':' . len(out) . ',' . line('$') . ' delete _'
49+
endif
50+
call setline(1, out)
51+
52+
" No errors detected, close the loclist.
53+
call setloclist(0, [], 'r')
54+
lclose
55+
elseif get(g:, 'zig_fmt_parse_errors', 1)
56+
let errors = s:parse_errors(expand('%'), out)
57+
58+
call setloclist(0, [], 'r', {
59+
\ 'title': 'Errors',
60+
\ 'items': errors,
61+
\ })
62+
63+
let max_win_height = get(g:, 'zig_fmt_max_window_height', 5)
64+
" Prevent the loclist from becoming too long.
65+
let win_height = min([max_win_height, len(errors)])
66+
" Open the loclist, but only if there's at least one error to show.
67+
execute 'silent! lwindow ' . win_height
68+
endif
69+
70+
call winrestview(view)
71+
72+
if err != 0
73+
echohl Error | echomsg "zig fmt returned error" | echohl None
74+
return
75+
endif
76+
77+
" Run the syntax highlighter on the updated content and recompute the folds if
78+
" needed.
79+
syntax sync fromstart
80+
endfunction
81+
82+
" parse_errors parses the given errors and returns a list of parsed errors
83+
function! s:parse_errors(filename, lines) abort
84+
" list of errors to be put into location list
85+
let errors = []
86+
for line in a:lines
87+
let tokens = matchlist(line, '^\(.\{-}\):\(\d\+\):\(\d\+\)\s*\(.*\)')
88+
if !empty(tokens)
89+
call add(errors,{
90+
\"filename": a:filename,
91+
\"lnum": tokens[2],
92+
\"col": tokens[3],
93+
\"text": tokens[4],
94+
\ })
95+
endif
96+
endfor
97+
98+
return errors
99+
endfunction
100+
" vim: sw=2 ts=2 et

runtime/doc/autocmd.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*autocmd.txt* For Vim version 9.0. Last change: 2022 Nov 22
1+
*autocmd.txt* For Vim version 9.0. Last change: 2022 Dec 12
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -97,7 +97,7 @@ If the `:autocmd` is in Vim9 script (a script that starts with `:vim9script`
9797
and in a `:def` function) then {cmd} will be executed as in Vim9
9898
script. Thus this depends on where the autocmd is defined, not where it is
9999
triggered.
100-
100+
*:autocmd-block*
101101
{cmd} can be a block, like with `:command`, see |:command-repl|. Example: >
102102
au BufReadPost *.xml {
103103
setlocal matchpairs+=<:>

runtime/doc/builtin.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*builtin.txt* For Vim version 9.0. Last change: 2022 Dec 05
1+
*builtin.txt* For Vim version 9.0. Last change: 2022 Dec 23
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -668,6 +668,8 @@ test_garbagecollect_soon() none free memory soon for testing
668668
test_getvalue({string}) any get value of an internal variable
669669
test_gui_event({event}, {args}) bool generate a GUI event for testing
670670
test_ignore_error({expr}) none ignore a specific error
671+
test_mswin_event({event}, {args})
672+
bool generate MS-Windows event for testing
671673
test_null_blob() Blob null value for testing
672674
test_null_channel() Channel null value for testing
673675
test_null_dict() Dict null value for testing
@@ -4137,7 +4139,7 @@ getscriptinfo([{opts}) *getscriptinfo()*
41374139
this script name links to, if any, otherwise
41384140
zero
41394141
variables A dictionary with the script-local variables.
4140-
Present only when the a particular script is
4142+
Present only when a particular script is
41414143
specified using the "sid" item in {opts}.
41424144
Note that this is a copy, the value of
41434145
script-local variables cannot be changed using
@@ -9135,6 +9137,8 @@ string({expr}) Return {expr} converted to a String. If {expr} is a Number,
91359137
Blob 0z00112233.44556677.8899
91369138
List [item, item]
91379139
Dictionary {key: value, key: value}
9140+
Class class SomeName
9141+
Object object of SomeName {lnum: 1, col: 3}
91389142

91399143
When a |List| or |Dictionary| has a recursive reference it is
91409144
replaced by "[...]" or "{...}". Using eval() on the result

runtime/doc/diff.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*diff.txt* For Vim version 9.0. Last change: 2022 Oct 01
1+
*diff.txt* For Vim version 9.0. Last change: 2022 Dec 24
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -148,6 +148,10 @@ Otherwise they are set to their default value:
148148
'foldmethod' "manual"
149149
'foldcolumn' 0
150150

151+
'foldenable' will most-likely be reset to off. That is when 'foldmethod' is
152+
is restored to "manual". The folds themselves are not cleared but they should
153+
not show up, resetting 'foldenable' is the best way to do that.
154+
151155
==============================================================================
152156
2. Viewing diffs *view-diffs*
153157

runtime/doc/eval.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*eval.txt* For Vim version 9.0. Last change: 2022 Dec 03
1+
*eval.txt* For Vim version 9.0. Last change: 2022 Dec 11
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -163,9 +163,10 @@ Note that " " and "0" are also non-empty strings, thus considered to be TRUE.
163163
A List, Dictionary or Float is not a Number or String, thus evaluate to FALSE.
164164

165165
*E611* *E745* *E728* *E703* *E729* *E730* *E731* *E908* *E910*
166-
*E913* *E974* *E975* *E976*
167-
|List|, |Dictionary|, |Funcref|, |Job|, |Channel| and |Blob| types are not
168-
automatically converted.
166+
*E913* *E974* *E975* *E976* *E1319* *E1320* *E1321* *E1322*
167+
*E1323* *E1324*
168+
|List|, |Dictionary|, |Funcref|, |Job|, |Channel|, |Blob|, |Class| and
169+
|object| types are not automatically converted.
169170

170171
*E805* *E806* *E808*
171172
When mixing Number and Float the Number is converted to Float. Otherwise

0 commit comments

Comments
 (0)