Skip to content

Commit 88b74d8

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents 9dbe03b + f0300fc commit 88b74d8

File tree

206 files changed

+5840
-3112
lines changed

Some content is hidden

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

206 files changed

+5840
-3112
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ src/tags
6868
/GPATH
6969
/GTAGS
7070
/GRTAGS
71+
nsis/tags
7172

7273
# Generated by "make test"
7374
src/po/*.ck

.hgignore

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ src/xxd/xxd
77
src/auto/if_perl.c
88
src/auto/gui_gtk_gresources.c
99
src/auto/gui_gtk_gresources.h
10+
src/auto/os_haiku.rdef
1011
src/objects/.dirstamp
1112
src/objects
12-
src/tags
1313
src/types.vim
1414

1515
# We do need src/auto/configure.
@@ -46,12 +46,15 @@ gvimext.lib
4646
gvim.lib
4747
runtime/doc/uganda.nsis.txt
4848
nsis/icons/*
49+
/vim90/
50+
.vscode/
4951

5052
# NetBeans
5153
nbproject/*
5254

5355
# Mac OSX
5456
src/xxd/xxd.dSYM
57+
.DS_Store
5558

5659
# All platforms
5760
*.rej
@@ -62,6 +65,12 @@ src/xxd/xxd.dSYM
6265
*.pyc
6366
*.log
6467
src/po/vim.pot
68+
src/tags
69+
/tags
70+
/GPATH
71+
/GTAGS
72+
/GRTAGS
73+
nsis/tags
6574

6675
# Generated by "make test"
6776
src/po/*.ck
@@ -78,14 +87,16 @@ src/testdir/dostmp/*
7887
src/testdir/messages
7988
src/testdir/viminfo
8089
src/testdir/opt_test.vim
90+
src/testdir/failed
91+
src/testdir/starttime
8192
runtime/indent/testdir/*.out
93+
runtime/indent/testdir/*.fail
8294
src/memfile_test
8395
src/json_test
8496
src/message_test
8597
src/kword_test
8698

8799
# Generated by "make install"
88-
runtime/doc/tags
89100
runtime/doc/doctags
90101

91102
# Generated by "make shadow". The directory names could be anything but we
@@ -95,5 +106,10 @@ src/shadow-*
95106
src/runtime
96107
src/pixmaps
97108

98-
# other possible files build by tools
109+
# other files possibly created by tools
99110
src/cscope.out
111+
112+
# Linter/language server files
113+
/.cache/clangd/
114+
/.ccls-cache/
115+
/compile_commands.json

nsis/gvim.nsi

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,28 @@ FunctionEnd
228228
!insertmacro GetParent ""
229229
!insertmacro GetParent "un."
230230

231+
# Get home directory
232+
!macro GetHomeDir un
233+
Function ${un}GetHomeDir
234+
Push $0
235+
Push $1
236+
ReadEnvStr $0 "HOME"
237+
${If} $0 == ""
238+
ReadEnvStr $0 "HOMEDRIVE"
239+
ReadEnvStr $1 "HOMEPATH"
240+
StrCpy $0 "$0$1"
241+
${If} $0 == ""
242+
ReadEnvStr $0 "USERPROFILE"
243+
${EndIf}
244+
${EndIf}
245+
Pop $1
246+
Exch $0 # put $0 on top of stack, restore $0 to original value
247+
FunctionEnd
248+
!macroend
249+
250+
!insertmacro GetHomeDir ""
251+
!insertmacro GetHomeDir "un."
252+
231253
# Check if Vim is already installed.
232254
# return: Installed directory. If not found, it will be empty.
233255
Function CheckOldVim
@@ -520,7 +542,8 @@ SectionGroup $(str_group_plugin) id_group_plugin
520542
Section "$(str_section_plugin_home)" id_section_pluginhome
521543
SectionIn 1 3
522544

523-
StrCpy $1 "$1 -create-directories home"
545+
# use ShellExecAsUser below instead
546+
# StrCpy $1 "$1 -create-directories home"
524547
SectionEnd
525548

526549
Section "$(str_section_plugin_vim)" id_section_pluginvim
@@ -594,6 +617,13 @@ Section -call_install_exe
594617
DetailPrint "$(str_msg_registering)"
595618
nsExec::Exec "$0\install.exe $1"
596619
Pop $3
620+
621+
${If} ${SectionIsSelected} ${id_section_pluginhome}
622+
ReadEnvStr $3 "COMSPEC"
623+
Call GetHomeDir
624+
Pop $4
625+
ShellExecAsUser::ShellExecAsUser "" "$3" '/c "cd /d "$4" & mkdir vimfiles & cd vimfiles & mkdir colors compiler doc ftdetect ftplugin indent keymap plugin syntax"' SW_HIDE
626+
${EndIf}
597627
SectionEnd
598628

599629
##########################################################
@@ -1042,15 +1072,8 @@ SectionEnd
10421072
SectionGroup "un.$(str_ungroup_plugin)" id_ungroup_plugin
10431073
Section /o "un.$(str_unsection_plugin_home)" id_unsection_plugin_home
10441074
# get the home dir
1045-
ReadEnvStr $0 "HOME"
1046-
${If} $0 == ""
1047-
ReadEnvStr $0 "HOMEDRIVE"
1048-
ReadEnvStr $1 "HOMEPATH"
1049-
StrCpy $0 "$0$1"
1050-
${If} $0 == ""
1051-
ReadEnvStr $0 "USERPROFILE"
1052-
${EndIf}
1053-
${EndIf}
1075+
Call un.GetHomeDir
1076+
Pop $0
10541077

10551078
${If} $0 != ""
10561079
!insertmacro RemoveVimfiles $0

runtime/autoload/dist/vimindent.vim

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,13 +1121,8 @@ def Is_IN_KeywordForLoop(line_1: string, line_2: string): bool # {{{3
11211121
enddef
11221122

11231123
def InCommentOrString(): bool # {{{3
1124-
for synID: number in synstack('.', col('.'))
1125-
if synIDattr(synID, 'name') =~ '\ccomment\|string\|heredoc'
1126-
return true
1127-
endif
1128-
endfor
1129-
1130-
return false
1124+
return synstack('.', col('.'))
1125+
->indexof((_, id: number): bool => synIDattr(id, 'name') =~ '\ccomment\|string\|heredoc') >= 0
11311126
enddef
11321127

11331128
def AlsoClosesBlock(line_B: dict<any>): bool # {{{3

runtime/autoload/python.vim

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ let s:maxoff = 50 " maximum number of lines to look backwards for ()
2222
function s:SearchBracket(fromlnum, flags)
2323
return searchpairpos('[[({]', '', '[])}]', a:flags,
2424
\ {-> synstack('.', col('.'))
25-
\ ->map({_, id -> id->synIDattr('name')})
26-
\ ->match('\%(Comment\|Todo\|String\)$') >= 0},
25+
\ ->indexof({_, id -> synIDattr(id, 'name') =~ '\%(Comment\|Todo\|String\)$'}) >= 0},
2726
\ [0, a:fromlnum - s:maxoff]->max(), g:python_indent.searchpair_timeout)
2827
endfunction
2928

@@ -157,15 +156,13 @@ function python#GetIndent(lnum, ...)
157156
" the start of the comment. synID() is slow, a linear search would take
158157
" too long on a long line.
159158
if synstack(plnum, pline_len)
160-
\ ->map({_, id -> id->synIDattr('name')})
161-
\ ->match('\%(Comment\|Todo\)$') >= 0
159+
\ ->indexof({_, id -> synIDattr(id, 'name') =~ '\%(Comment\|Todo\)$'}) >= 0
162160
let min = 1
163161
let max = pline_len
164162
while min < max
165163
let col = (min + max) / 2
166164
if synstack(plnum, col)
167-
\ ->map({_, id -> id->synIDattr('name')})
168-
\ ->match('\%(Comment\|Todo\)$') >= 0
165+
\ ->indexof({_, id -> synIDattr(id, 'name') =~ '\%(Comment\|Todo\)$'}) >= 0
169166
let max = col
170167
else
171168
let min = col + 1

runtime/doc/autocmd.txt

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

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -64,7 +64,7 @@ Example in Vim9 script: >
6464
In legacy script: >
6565
call autocmd_add(#{replace: v:true,
6666
\ group: 'DemoGroup',
67-
\ event: 'BufEnter',
67+
\ event: 'BufEnter',
6868
\ pattern: '*.txt',
6969
\ cmd: 'call DemoBufEnter()'
7070
\ })
@@ -400,7 +400,7 @@ Name triggered by ~
400400
|InsertEnter| starting Insert mode
401401
|InsertChange| when typing <Insert> while in Insert or Replace mode
402402
|InsertLeave| when leaving Insert mode
403-
|InsertLeavePre| just before leaving Insert mode
403+
|InsertLeavePre| just before leaving Insert mode
404404
|InsertCharPre| when a character was typed in Insert mode, before
405405
inserting it
406406

@@ -613,9 +613,11 @@ CmdlineEnter After moving the cursor to the command line,
613613
where the user can type a command or search
614614
string; including non-interactive use of ":"
615615
in a mapping, but not when using |<Cmd>|.
616+
The pattern is matched against the character
617+
representing the type of command-line.
618+
|cmdwin-char|
616619
<afile> is set to a single character,
617620
indicating the type of command-line.
618-
|cmdwin-char|
619621
*CmdlineLeave*
620622
CmdlineLeave Before leaving the command line; including
621623
non-interactive use of ":" in a mapping, but

runtime/doc/builtin.txt

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*builtin.txt* For Vim version 9.0. Last change: 2023 Jan 17
1+
*builtin.txt* For Vim version 9.0. Last change: 2023 Feb 27
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -266,7 +266,7 @@ gettabwinvar({tabnr}, {winnr}, {name} [, {def}])
266266
gettagstack([{nr}]) Dict get the tag stack of window {nr}
267267
gettext({text}) String lookup translation of {text}
268268
getwininfo([{winid}]) List list of info about each window
269-
getwinpos([{timeout}]) List X and Y coord in pixels of the Vim window
269+
getwinpos([{timeout}]) List X and Y coord in pixels of Vim window
270270
getwinposx() Number X coord in pixels of the Vim window
271271
getwinposy() Number Y coord in pixels of the Vim window
272272
getwinvar({nr}, {varname} [, {def}])
@@ -382,7 +382,7 @@ matchstrpos({expr}, {pat} [, {start} [, {count}]])
382382
max({expr}) Number maximum value of items in {expr}
383383
menu_info({name} [, {mode}]) Dict get menu item information
384384
min({expr}) Number minimum value of items in {expr}
385-
mkdir({name} [, {path} [, {prot}]])
385+
mkdir({name} [, {flags} [, {prot}]])
386386
Number create directory {name}
387387
mode([expr]) String current editing mode
388388
mzeval({expr}) any evaluate |MzScheme| expression
@@ -2571,8 +2571,7 @@ extend({expr1}, {expr2} [, {expr3}]) *extend()*
25712571
extendnew({expr1}, {expr2} [, {expr3}]) *extendnew()*
25722572
Like |extend()| but instead of adding items to {expr1} a new
25732573
List or Dictionary is created and returned. {expr1} remains
2574-
unchanged. Items can still be changed by {expr2}, if you
2575-
don't want that use |deepcopy()| first.
2574+
unchanged.
25762575

25772576

25782577
feedkeys({string} [, {mode}]) *feedkeys()*
@@ -6263,17 +6262,20 @@ min({expr}) Return the minimum value of all items in {expr}. Example: >
62636262
mylist->min()
62646263
62656264
< *mkdir()* *E739*
6266-
mkdir({name} [, {path} [, {prot}]])
6265+
mkdir({name} [, {flags} [, {prot}]])
62676266
Create directory {name}.
62686267

6269-
If {path} contains "p" then intermediate directories are
6270-
created as necessary. Otherwise it must be "".
6268+
When {flags} is present it must be a string. An empty string
6269+
has no effect.
6270+
6271+
If {flags} contains "p" then intermediate directories are
6272+
created as necessary.
62716273

6272-
If {path} contains "D" then {name} is deleted at the end of
6274+
If {flags} contains "D" then {name} is deleted at the end of
62736275
the current function, as with: >
62746276
defer delete({name}, 'd')
62756277
<
6276-
If {path} contains "R" then {name} is deleted recursively at
6278+
If {flags} contains "R" then {name} is deleted recursively at
62776279
the end of the current function, as with: >
62786280
defer delete({name}, 'rf')
62796281
< Note that when {name} has more than one part and "p" is used
@@ -7960,7 +7962,7 @@ setcellwidths({list}) *setcellwidths()*
79607962
terminal, counted in screen cells. The values override
79617963
'ambiwidth'. Example: >
79627964
call setcellwidths([
7963-
\ [0x111, 0x111, 1],
7965+
\ [0x111, 0x111, 1],
79647966
\ [0x2194, 0x2199, 2],
79657967
\ ])
79667968
@@ -7974,7 +7976,7 @@ setcellwidths({list}) *setcellwidths()*
79747976
{width} must be either 1 or 2, indicating the character width
79757977
in screen cells. *E1112*
79767978
An error is given if the argument is invalid, also when a
7977-
range overlaps with another. *E1113*
7979+
range overlaps with another. *E1113*
79787980

79797981
If the new value causes 'fillchars' or 'listchars' to become
79807982
invalid it is rejected and an error is given.
@@ -9832,6 +9834,8 @@ timer_start({time}, {callback} [, {options}])
98329834
{time} is the waiting time in milliseconds. This is the
98339835
minimum time before invoking the callback. When the system is
98349836
busy or Vim is not waiting for input the time will be longer.
9837+
Zero can be used to execute the callback when Vim is back in
9838+
the main loop.
98359839

98369840
{callback} is the function to call. It can be the name of a
98379841
function or a |Funcref|. It is called with one argument, which
@@ -10575,7 +10579,7 @@ writefile({object}, {fname} [, {flags}])
1057510579
<
1057610580
'D' Delete the file when the current function ends. This
1057710581
works like: >
10578-
:defer delete({fname})
10582+
:defer delete({fname})
1057910583
< Fails when not in a function. Also see |:defer|.
1058010584

1058110585
's' fsync() is called after writing the file. This flushes

runtime/doc/change.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*change.txt* For Vim version 9.0. Last change: 2022 Nov 20
1+
*change.txt* For Vim version 9.0. Last change: 2023 Feb 27
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -296,7 +296,9 @@ gr{char} Replace the virtual characters under the cursor with
296296
{char}. This replaces in screen space, not file
297297
space. See |gR| and |Virtual-Replace-mode| for more
298298
details. As with |r| a count may be given.
299-
{char} can be entered like with |r|.
299+
{char} can be entered like with |r|, but characters
300+
that have a special meaning in Insert mode, such as
301+
most CTRL-keys, cannot be used.
300302

301303
*digraph-arg*
302304
The argument for Normal mode commands like |r| and |t| is a single character.
@@ -1033,7 +1035,7 @@ inside of strings can change! Also see 'softtabstop' option. >
10331035
< to display registers '1' and 'a'. Spaces are allowed
10341036
in {arg}.
10351037

1036-
*:di* *:display*
1038+
*:di* *:dis* *:display*
10371039
:di[splay] [arg] Same as :registers.
10381040

10391041
*y* *yank*

runtime/doc/cmdline.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*cmdline.txt* For Vim version 9.0. Last change: 2022 Nov 11
1+
*cmdline.txt* For Vim version 9.0. Last change: 2023 Feb 08
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -617,6 +617,7 @@ followed by another Vim command:
617617
:read !
618618
:scscope
619619
:sign
620+
:tabdo
620621
:tcl
621622
:tcldo
622623
:tclfile

runtime/doc/diff.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ possible to view the changes you have made to a buffer since the file was
181181
loaded. Since Vim doesn't allow having two buffers for the same file, you
182182
need another buffer. This command is useful: >
183183
command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_
184-
\ | diffthis | wincmd p | diffthis
184+
\ | diffthis | wincmd p | diffthis
185185
(this is in |defaults.vim|). Use ":DiffOrig" to see the differences between
186186
the current buffer and the file it was loaded from.
187187

0 commit comments

Comments
 (0)