Skip to content

Commit a26996d

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents c154baf + 7bcd25c commit a26996d

138 files changed

Lines changed: 3373 additions & 912 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: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,7 @@ runtime/syntax/xs.vim @petdance
516516
runtime/syntax/xslt.vim @Boobies
517517
runtime/syntax/xxd.vim @cecamp
518518
runtime/syntax/yacc.vim @cecamp
519+
runtime/syntax/zserio.vim @dpelle
519520
runtime/syntax/zsh.vim @chrisbra
520521
runtime/tutor/tutor.eo @dpelle
521522
runtime/tutor/tutor.eo.utf-8 @dpelle

Filelist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ SRC_ALL = \
217217
src/testdir/color_ramp.vim \
218218
src/testdir/silent.wav \
219219
src/testdir/popupbounce.vim \
220+
src/testdir/crash/* \
220221
src/proto.h \
221222
src/protodef.h \
222223
src/proto/alloc.pro \

runtime/autoload/gzip.vim

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ 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 f = fnamemodify(exepath(name), ":p:h") !=# getcwd()
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
1518
if !f
1619
echoerr "Warning: NOT executing " .. name .. " from current directory!"
1720
endif

runtime/autoload/tohtml.vim

Lines changed: 36 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
" Vim autoload file for the tohtml plugin.
22
" Maintainer: Ben Fritz <[email protected]>
3-
" Last Change: 2023 Jan 01
3+
" Last Change: 2023 Sep 03
44
"
55
" Additional contributors:
66
"
@@ -307,7 +307,7 @@ func! tohtml#Convert2HTML(line1, line2) "{{{
307307
let g:html_diff_win_num = 0
308308
for window in win_list
309309
" switch to the next buffer to convert
310-
exe ":" . bufwinnr(window) . "wincmd w"
310+
exe ":" .. bufwinnr(window) .. "wincmd w"
311311

312312
" figure out whether current charset and encoding will work, if not
313313
" default to UTF-8
@@ -355,7 +355,7 @@ func! tohtml#Diff2HTML(win_list, buf_list) "{{{
355355
if !s:settings.no_doc
356356
if s:settings.use_xhtml
357357
if s:settings.encoding != ""
358-
let xml_line = "<?xml version=\"1.0\" encoding=\"" . s:settings.encoding . "\"?>"
358+
let xml_line = "<?xml version=\"1.0\" encoding=\"" .. s:settings.encoding .. "\"?>"
359359
else
360360
let xml_line = "<?xml version=\"1.0\"?>"
361361
endif
@@ -387,34 +387,34 @@ func! tohtml#Diff2HTML(win_list, buf_list) "{{{
387387
" contained in XML information
388388
if s:settings.encoding != "" && !s:settings.use_xhtml
389389
if s:html5
390-
call add(html, '<meta charset="' . s:settings.encoding . '"' . tag_close)
390+
call add(html, '<meta charset="' .. s:settings.encoding .. '"' .. tag_close)
391391
else
392-
call add(html, "<meta http-equiv=\"content-type\" content=\"text/html; charset=" . s:settings.encoding . '"' . tag_close)
392+
call add(html, "<meta http-equiv=\"content-type\" content=\"text/html; charset=" .. s:settings.encoding .. '"' .. tag_close)
393393
endif
394394
endif
395395

396396
call add(html, '<title>diff</title>')
397-
call add(html, '<meta name="Generator" content="Vim/'.v:version/100.'.'.v:version%100.'"'.tag_close)
398-
call add(html, '<meta name="plugin-version" content="'.g:loaded_2html_plugin.'"'.tag_close)
397+
call add(html, '<meta name="Generator" content="Vim/'..v:version/100..'.'..v:version%100..'"'..tag_close)
398+
call add(html, '<meta name="plugin-version" content="'..g:loaded_2html_plugin..'"'..tag_close)
399399
call add(html, '<meta name="settings" content="'.
400400
\ join(filter(keys(s:settings),'s:settings[v:val]'),',').
401-
\ ',prevent_copy='.s:settings.prevent_copy.
402-
\ ',use_input_for_pc='.s:settings.use_input_for_pc.
403-
\ '"'.tag_close)
401+
\ ',prevent_copy='..s:settings.prevent_copy.
402+
\ ',use_input_for_pc='..s:settings.use_input_for_pc.
403+
\ '"'..tag_close)
404404
call add(html, '<meta name="colorscheme" content="'.
405405
\ (exists('g:colors_name')
406406
\ ? g:colors_name
407-
\ : 'none'). '"'.tag_close)
407+
\ : 'none').. '"'..tag_close)
408408

409409
call add(html, '</head>')
410410
let body_line_num = len(html)
411-
call add(html, '<body'.(s:settings.line_ids ? ' onload="JumpToLine();"' : '').'>')
411+
call add(html, '<body'..(s:settings.line_ids ? ' onload="JumpToLine();"' : '')..'>')
412412
endif
413-
call add(html, "<table ".(s:settings.use_css? "" : "border='1' width='100%' ")."id='vimCodeElement".s:settings.id_suffix."'>")
413+
call add(html, "<table "..(s:settings.use_css? "" : "border='1' width='100%' ").."id='vimCodeElement"..s:settings.id_suffix.."'>")
414414

415415
call add(html, '<tr>')
416416
for buf in a:win_list
417-
call add(html, '<th>'.bufname(buf).'</th>')
417+
call add(html, '<th>'..bufname(buf)..'</th>')
418418
endfor
419419
call add(html, '</tr><tr>')
420420

@@ -423,7 +423,7 @@ func! tohtml#Diff2HTML(win_list, buf_list) "{{{
423423

424424
for buf in a:buf_list
425425
let temp = []
426-
exe bufwinnr(buf) . 'wincmd w'
426+
exe bufwinnr(buf) .. 'wincmd w'
427427

428428
" If text is folded because of user foldmethod settings, etc. we don't want
429429
" to act on everything in a fold by mistake.
@@ -526,16 +526,16 @@ func! tohtml#Diff2HTML(win_list, buf_list) "{{{
526526
endif
527527

528528
let i = 1
529-
let name = "Diff" . (s:settings.use_xhtml ? ".xhtml" : ".html")
529+
let name = "Diff" .. (s:settings.use_xhtml ? ".xhtml" : ".html")
530530
" Find an unused file name if current file name is already in use
531531
while filereadable(name)
532-
let name = substitute(name, '\d*\.x\?html$', '', '') . i . '.' . fnamemodify(copy(name), ":t:e")
532+
let name = substitute(name, '\d*\.x\?html$', '', '') .. i .. '.' .. fnamemodify(copy(name), ":t:e")
533533
let i += 1
534534
endwhile
535535

536536
let s:ei_sav = &eventignore
537537
set eventignore+=FileType
538-
exe "topleft new " . name
538+
exe "topleft new " .. name
539539
let &eventignore=s:ei_sav
540540
unlet s:ei_sav
541541

@@ -601,7 +601,7 @@ func! tohtml#Diff2HTML(win_list, buf_list) "{{{
601601
\ "",
602602
\ " /* navigate upwards in the DOM tree to open all folds containing the line */",
603603
\ " var node = lineElem;",
604-
\ " while (node && node.id != 'vimCodeElement".s:settings.id_suffix."')",
604+
\ " while (node && node.id != 'vimCodeElement"..s:settings.id_suffix.."')",
605605
\ " {",
606606
\ " if (node.className == 'closed-fold')",
607607
\ " {",
@@ -640,7 +640,7 @@ func! tohtml#Diff2HTML(win_list, buf_list) "{{{
640640
call append(style_start, [
641641
\ " function toggleFold(objID)",
642642
\ " {",
643-
\ " for (win_num = 1; win_num <= ".len(a:buf_list)."; win_num++)",
643+
\ " for (win_num = 1; win_num <= "..len(a:buf_list).."; win_num++)",
644644
\ " {",
645645
\ " var fold;",
646646
\ ' fold = document.getElementById("win"+win_num+objID);',
@@ -660,7 +660,7 @@ func! tohtml#Diff2HTML(win_list, buf_list) "{{{
660660
if s:uses_script
661661
" insert script tag if needed
662662
call append(style_start, [
663-
\ "<script" . (s:html5 ? "" : " type='text/javascript'") . ">",
663+
\ "<script" .. (s:html5 ? "" : " type='text/javascript'") .. ">",
664664
\ s:settings.use_xhtml ? '//<![CDATA[' : "<!--"])
665665
endif
666666

@@ -671,14 +671,14 @@ func! tohtml#Diff2HTML(win_list, buf_list) "{{{
671671
" is pretty useless for really long lines. {{{
672672
if s:settings.use_css
673673
call append(style_start,
674-
\ ['<style' . (s:html5 ? '' : 'type="text/css"') . '>']+
674+
\ ['<style' .. (s:html5 ? '' : 'type="text/css"') .. '>']+
675675
\ style+
676676
\ [ s:settings.use_xhtml ? '' : '<!--',
677677
\ 'table { table-layout: fixed; }',
678678
\ 'html, body, table, tbody { width: 100%; margin: 0; padding: 0; }',
679679
\ 'table, td, th { border: 1px solid; }',
680680
\ 'td { vertical-align: top; }',
681-
\ 'th, td { width: '.printf("%.1f",100.0/len(a:win_list)).'%; }',
681+
\ 'th, td { width: '..printf("%.1f",100.0/len(a:win_list))..'%; }',
682682
\ 'td div { overflow: auto; }',
683683
\ s:settings.use_xhtml ? '' : '-->',
684684
\ '</style>'
@@ -694,7 +694,7 @@ endfunc "}}}
694694
" Gets a single user option and sets it in the passed-in Dict, or gives it the
695695
" default value if the option doesn't actually exist.
696696
func! tohtml#GetOption(settings, option, default) "{{{
697-
if exists('g:html_'.a:option)
697+
if exists('g:html_'..a:option)
698698
let a:settings[a:option] = g:html_{a:option}
699699
else
700700
let a:settings[a:option] = a:default
@@ -713,10 +713,11 @@ func! tohtml#GetUserSettings() "{{{
713713
let user_settings = {}
714714

715715
" Define the correct option if the old option name exists and we haven't
716-
" already defined the correct one. Maybe I'll put out a warning message about
717-
" this sometime and remove the old option entirely at some even later time,
718-
" but for now just silently accept the old option.
716+
" already defined the correct one.
719717
if exists('g:use_xhtml') && !exists("g:html_use_xhtml")
718+
echohl WarningMsg
719+
echomsg "Warning: g:use_xhtml is deprecated, use g:html_use_xhtml"
720+
echohl None
720721
let g:html_use_xhtml = g:use_xhtml
721722
endif
722723

@@ -739,7 +740,7 @@ func! tohtml#GetUserSettings() "{{{
739740
call tohtml#GetOption(user_settings, 'whole_filler', 0 )
740741
call tohtml#GetOption(user_settings, 'use_xhtml', 0 )
741742
call tohtml#GetOption(user_settings, 'line_ids', user_settings.number_lines )
742-
call tohtml#GetOption(user_settings, 'use_input_for_pc', 'fallback')
743+
call tohtml#GetOption(user_settings, 'use_input_for_pc', 'none')
743744
" }}}
744745

745746
" override those settings that need it {{{
@@ -854,16 +855,16 @@ func! tohtml#GetUserSettings() "{{{
854855
if user_settings.use_css
855856
if exists("g:html_prevent_copy")
856857
if user_settings.dynamic_folds && !user_settings.no_foldcolumn && g:html_prevent_copy =~# 'f'
857-
let user_settings.prevent_copy .= 'f'
858+
let user_settings.prevent_copy ..= 'f'
858859
endif
859860
if user_settings.number_lines && g:html_prevent_copy =~# 'n'
860-
let user_settings.prevent_copy .= 'n'
861+
let user_settings.prevent_copy ..= 'n'
861862
endif
862863
if &diff && g:html_prevent_copy =~# 'd'
863-
let user_settings.prevent_copy .= 'd'
864+
let user_settings.prevent_copy ..= 'd'
864865
endif
865866
if !user_settings.ignore_folding && g:html_prevent_copy =~# 't'
866-
let user_settings.prevent_copy .= 't'
867+
let user_settings.prevent_copy ..= 't'
867868
endif
868869
else
869870
let user_settings.prevent_copy = ""
@@ -875,10 +876,10 @@ func! tohtml#GetUserSettings() "{{{
875876

876877
" enforce valid values for use_input_for_pc
877878
if user_settings.use_input_for_pc !~# 'fallback\|none\|all'
878-
let user_settings.use_input_for_pc = 'fallback'
879+
let user_settings.use_input_for_pc = 'none'
879880
echohl WarningMsg
880-
echomsg '2html: "' . g:html_use_input_for_pc . '" is not valid for g:html_use_input_for_pc'
881-
echomsg '2html: defaulting to "' . user_settings.use_input_for_pc . '"'
881+
echomsg '2html: "' .. g:html_use_input_for_pc .. '" is not valid for g:html_use_input_for_pc'
882+
echomsg '2html: defaulting to "' .. user_settings.use_input_for_pc .. '"'
882883
echohl None
883884
sleep 3
884885
endif

runtime/autoload/zip.vim

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,15 @@ if !exists("g:zip_extractcmd")
5757
let g:zip_extractcmd= g:zip_unzipcmd
5858
endif
5959

60-
if fnamemodify(exepath(g:zip_unzipcmd), ":p:h") ==# getcwd()
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
6164
echoerr "Warning: NOT executing " .. g:zip_unzipcmd .. " from current directory!"
6265
finish
6366
endif
67+
unlet s:tmp_cwd
68+
6469
" ----------------
6570
" Functions: {{{1
6671
" ----------------

runtime/doc/builtin.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6410,6 +6410,7 @@ mode([expr]) Return a string that indicates the current mode.
64106410
Rvc Virtual Replace mode completion |compl-generic|
64116411
Rvx Virtual Replace mode |i_CTRL-X| completion
64126412
c Command-line editing
6413+
ct Command-line editing via Terminal-Job mode
64136414
cv Vim Ex mode |gQ|
64146415
ce Normal Ex mode |Q|
64156416
r Hit-enter prompt
@@ -6708,8 +6709,13 @@ printf({fmt}, {expr1} ...) *printf()*
67086709
a conversion is wider than the field width, the field
67096710
is expanded to contain the conversion result.
67106711
The 'h' modifier indicates the argument is 16 bits.
6711-
The 'l' modifier indicates the argument is 32 bits.
6712-
The 'L' modifier indicates the argument is 64 bits.
6712+
The 'l' modifier indicates the argument is a long
6713+
integer. The size will be 32 bits or 64 bits
6714+
depending on your platform.
6715+
The "ll" modifier indicates the argument is 64 bits.
6716+
The b and B conversion specifiers never take a width
6717+
modifier and always assume their argument is a 64 bit
6718+
integer.
67136719
Generally, these modifiers are not useful. They are
67146720
ignored when type is known from the argument.
67156721

runtime/doc/filetype.txt

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*filetype.txt* For Vim version 9.0. Last change: 2023 Apr 29
1+
*filetype.txt* For Vim version 9.0. Last change: 2023 Sep 06
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -419,11 +419,24 @@ ways to change this:
419419
3. Docs for the default filetype plugins. *ftplugin-docs*
420420

421421

422+
*plugin_exec* *g:plugin_exec*
423+
Enable executing of external commands. This was done historically for e.g.
424+
the perl filetype plugin (and a few others) to set the search path.
425+
Disabled by default for security reasons: >
426+
:let g:plugin_exec = 1
427+
It is also possible to enable this only for certain filetypes: >
428+
:let g:<filetype>_exec = 1
429+
So to enable this only for ruby, set the following variable: >
430+
:let g:ruby_exec = 1
431+
432+
If both, the global `plugin_exec` and the `<filetype>_exec` specific variable
433+
are set, the filetpe specific variable should have precedent.
434+
422435
AWK *ft-awk-plugin*
423436

424437
Support for features specific to GNU Awk, like @include, can be enabled by
425438
setting: >
426-
let g:awk_is_gawk = 1
439+
:let g:awk_is_gawk = 1
427440
428441
429442
CHANGELOG *ft-changelog-plugin*

runtime/doc/syntax.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ The method used to prevent copying in the generated page depends on the value
596596
of |g:html_use_input_for_pc|.
597597

598598
*g:html_use_input_for_pc*
599-
Default: "fallback"
599+
Default: "none"
600600
If |g:html_prevent_copy| is non-empty, then:
601601

602602
When "all", read-only <input> elements are used in place of normal text for

runtime/doc/tags

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4496,6 +4496,7 @@ E1362 vim9class.txt /*E1362*
44964496
E1363 vim9class.txt /*E1363*
44974497
E1364 recover.txt /*E1364*
44984498
E137 starting.txt /*E137*
4499+
E1370 vim9class.txt /*E1370*
44994500
E138 starting.txt /*E138*
45004501
E139 message.txt /*E139*
45014502
E140 message.txt /*E140*
@@ -5943,6 +5944,7 @@ abandon editing.txt /*abandon*
59435944
abbreviations map.txt /*abbreviations*
59445945
abel.vim syntax.txt /*abel.vim*
59455946
abs() builtin.txt /*abs()*
5947+
abstract-method vim9class.txt /*abstract-method*
59465948
acos() builtin.txt /*acos()*
59475949
active-buffer windows.txt /*active-buffer*
59485950
ada#Create_Tags() ft_ada.txt /*ada#Create_Tags()*
@@ -7582,6 +7584,7 @@ g:netrw_wiw pi_netrw.txt /*g:netrw_wiw*
75827584
g:netrw_xstrlen pi_netrw.txt /*g:netrw_xstrlen*
75837585
g:no_mail_maps filetype.txt /*g:no_mail_maps*
75847586
g:no_plugin_maps filetype.txt /*g:no_plugin_maps*
7587+
g:plugin_exec filetype.txt /*g:plugin_exec*
75857588
g:rust_bang_comment_leader ft_rust.txt /*g:rust_bang_comment_leader*
75867589
g:rust_conceal ft_rust.txt /*g:rust_conceal*
75877590
g:rust_conceal_mod_path ft_rust.txt /*g:rust_conceal_mod_path*
@@ -8135,6 +8138,7 @@ i_CTRL-O insert.txt /*i_CTRL-O*
81358138
i_CTRL-P insert.txt /*i_CTRL-P*
81368139
i_CTRL-Q insert.txt /*i_CTRL-Q*
81378140
i_CTRL-R insert.txt /*i_CTRL-R*
8141+
i_CTRL-R_- insert.txt /*i_CTRL-R_-*
81388142
i_CTRL-R_= insert.txt /*i_CTRL-R_=*
81398143
i_CTRL-R_CTRL-O insert.txt /*i_CTRL-R_CTRL-O*
81408144
i_CTRL-R_CTRL-P insert.txt /*i_CTRL-R_CTRL-P*
@@ -9304,6 +9308,7 @@ plugin usr_05.txt /*plugin*
93049308
plugin-details filetype.txt /*plugin-details*
93059309
plugin-filetype usr_51.txt /*plugin-filetype*
93069310
plugin-special usr_51.txt /*plugin-special*
9311+
plugin_exec filetype.txt /*plugin_exec*
93079312
plugin_name.txt helphelp.txt /*plugin_name.txt*
93089313
pmbcs-option print.txt /*pmbcs-option*
93099314
pmbfn-option print.txt /*pmbfn-option*

runtime/doc/vim9class.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,16 @@ class, for which objects can be created. Example: >
358358
An abstract class is defined the same way as a normal class, except that it
359359
does not have any new() method. *E1359*
360360

361+
*abstract-method*
362+
An abstract method can be defined in an abstract class by using the "abstract"
363+
prefix when defining the function: >
364+
365+
abstract class Shape
366+
abstract def Draw()
367+
endclass
368+
369+
A class extending the abstract class must implement all the abstract methods.
370+
Class methods in an abstract class can also be abstract methods.
361371

362372
==============================================================================
363373

0 commit comments

Comments
 (0)