Skip to content

Commit

Permalink
Merge remote-tracking branch 'vim/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
ychin committed Nov 19, 2024
2 parents cf2c1e7 + a87462a commit d25ae00
Show file tree
Hide file tree
Showing 209 changed files with 8,565 additions and 2,397 deletions.
3 changes: 2 additions & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ freebsd_task:
- chown -R cirrus:cirrus .
- sudo -u cirrus make test
on_failure:
screendump_artifacts:
test_artifacts:
name: "Cirrus-CI-freebsd-failed-tests"
path: |
runtime/indent/testdir/*.fail
runtime/syntax/testdir/failed/*
src/testdir/failed/*
type: application/octet-stream
25 changes: 25 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# https://spec.editorconfig.org/#supported-pairs
root = true

[*]
indent_style = tab
tab_width = 8
trim_trailing_whitespace = true
insert_final_newline = true

[*.{c,h,proto}]
indent_size = 4

[*.{md,yml,sh,bat}]
# This will become the default after we migrate the codebase
indent_style = space
indent_size = 2

[*.md]
# Markdown uses trailing whitespaces to do an hard line break
# https://spec.commonmark.org/0.31.2/#hard-line-breaks
trim_trailing_whitespace = false

[runtime/doc/**.txt]
# It can mess up some documentation by trying to strip trailing whitespaces
trim_trailing_whitespace = false
10 changes: 10 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# When making commits that are strictly formatting/style changes, add the
# commit hash here, so git blame can ignore the change. See docs for more details:
#
# https://git-scm.com/docs/git-config#Documentation/git-config.txt-blameignoreRevsFile
#
# Run this command to always ignore formatting commits in git blame
# git config blame.ignoreRevsFile .git-blame-ignore-revs

# Patch v9.1.0829 expanded tabs to spaces in sound.c
8ce738de3fd7192fa6274730594305cde780074c
5 changes: 5 additions & 0 deletions .github/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ runtime/ftplugin/chatito.vim @ObserverOfTime
runtime/ftplugin/chicken.vim @evhan
runtime/ftplugin/clojure.vim @axvr
runtime/ftplugin/cmakecache.vim @ribru17
runtime/ftplugin/cook.vim @ribru17
runtime/ftplugin/cs.vim @nickspoons
runtime/ftplugin/csh.vim @dkearns
runtime/ftplugin/css.vim @dkearns
Expand Down Expand Up @@ -201,6 +202,7 @@ runtime/ftplugin/kdl.vim @imsnif @jiangyinzuo
runtime/ftplugin/kivy.vim @ribru17
runtime/ftplugin/kotlin.vim @udalov
runtime/ftplugin/ldapconf.vim @ribru17
runtime/ftplugin/leo.vim @ribru17
runtime/ftplugin/less.vim @genoma
runtime/ftplugin/lex.vim @ribru17
runtime/ftplugin/liquid.vim @tpope
Expand All @@ -215,6 +217,7 @@ runtime/ftplugin/meson.vim @Liambeguin
runtime/ftplugin/modula2.vim @dkearns
runtime/ftplugin/modula3.vim @dkearns
runtime/ftplugin/mojo.vim @ribru17
runtime/ftplugin/mss.vim @Freed-Wu
runtime/ftplugin/nginx.vim @chr4
runtime/ftplugin/nim.vim @ribru17
runtime/ftplugin/nroff.vim @a-vrma
Expand Down Expand Up @@ -263,6 +266,7 @@ runtime/ftplugin/squirrel.vim @ribru17
runtime/ftplugin/ssa.vim @ObserverOfTime
runtime/ftplugin/sshdconfig.vim @jiangyinzuo
runtime/ftplugin/svelte.vim @igorlfs
runtime/ftplugin/sway.vim @ribru17
runtime/ftplugin/swayconfig.vim @jamespeapen
runtime/ftplugin/systemverilog.vim @Kocha
runtime/ftplugin/swig.vim @jmarrec
Expand Down Expand Up @@ -513,6 +517,7 @@ runtime/syntax/modula2/opt/iso.vim @trijezdci
runtime/syntax/modula2/opt/pim.vim @trijezdci
runtime/syntax/modula2/opt/r10.vim @trijezdci
runtime/syntax/modula3.vim @dkearns
runtime/syntax/mss.vim @Freed-Wu
runtime/syntax/n1ql.vim @pr3d4t0r
runtime/syntax/nginx.vim @chr4
runtime/syntax/ninja.vim @nico
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'screendump'
description: "Upload failed screendump tests"
name: 'test_artifacts'
description: "Upload failed test artifacts"
runs:
using: "composite"
steps:
Expand All @@ -12,6 +12,7 @@ runs:
# A file, directory or wildcard pattern that describes what
# to upload.
path: |
${{ github.workspace }}/runtime/indent/testdir/*.fail
${{ github.workspace }}/runtime/syntax/testdir/failed/*
${{ github.workspace }}/src/testdir/failed/*
# The desired behavior if no files are found using the
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-macvim.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ jobs:

- name: Upload failed test files
if: ${{ !cancelled() && failure() }}
uses: ./.github/actions/screendump
uses: ./.github/actions/test_artifacts

- name: Test Vim (GUI)
timeout-minutes: 25
Expand Down
12 changes: 11 additions & 1 deletion Filelist
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,20 @@
SRC_ALL = \
.cirrus.yml \
.gitattributes \
.git-blame-ignore-revs \
.github/MAINTAINERS \
.github/ISSUE_TEMPLATE/bug_report.yml \
.github/ISSUE_TEMPLATE/feature_request.md \
.github/workflows/ci.yml \
.github/workflows/codeql-analysis.yml \
.github/actions/screendump/action.yml \
.github/workflows/coverity.yml \
.github/actions/test_artifacts/action.yml \
.github/dependabot.yml \
.gitignore \
.hgignore \
.appveyor.yml \
.codecov.yml \
.editorconfig \
ci/appveyor.bat \
ci/config.mk*.sed \
ci/if_ver*.vim \
Expand Down Expand Up @@ -761,7 +763,13 @@ RT_ALL = \
runtime/tools/[a-z]*[a-z0-9] \
runtime/tutor/README.txt \
runtime/tutor/tutor \
runtime/tutor/en/vim-01-beginner.tutor \
runtime/tutor/en/vim-01-beginner.tutor.json \
runtime/tutor/tutor.tutor \
runtime/tutor/tutor.tutor.json \
runtime/tutor/tutor.vim \
runtime/tutor/tutor2 \
runtime/tutor/tutor2.utf-8 \
runtime/vimrc_example.vim \
runtime/pack/dist/opt/cfilter/plugin/cfilter.vim \
runtime/pack/dist/opt/comment/plugin/comment.vim \
Expand All @@ -783,6 +791,8 @@ RT_ALL = \
runtime/pack/dist/opt/editorconfig/doc/editorconfig.txt \
runtime/pack/dist/opt/editorconfig/ftdetect/editorconfig.vim \
runtime/pack/dist/opt/editorconfig/plugin/editorconfig.vim \
runtime/pack/dist/opt/helptoc/autoload/helptoc.vim \
runtime/pack/dist/opt/helptoc/plugin/helptoc.vim \
runtime/pack/dist/opt/justify/plugin/justify.vim \
runtime/pack/dist/opt/matchit/plugin/matchit.vim \
runtime/pack/dist/opt/matchit/doc/matchit.txt \
Expand Down
8 changes: 8 additions & 0 deletions runtime/autoload/dist/ft.vim
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,14 @@ export def FTcls()
endif
enddef

export def FTll()
if getline(1) =~ ';\|\<source_filename\>\|\<target\>'
setf llvm
else
setf lifelines
endif
enddef

export def FTlpc()
if exists("g:lpc_syntax_for_c")
var lnum = 1
Expand Down
7 changes: 4 additions & 3 deletions runtime/autoload/dist/vimindent.vim
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ vim9script

# Language: Vim script
# Maintainer: github user lacygoill
# Last Change: 2023 Jun 29
# Last Change: 2024 Nov 08
#
# Includes Changes from Vim:
# Includes changes from The Vim Project:
# - 2024 Feb 09: Fix indent after literal Dict (A. Radev via #13966)
# - 2024 Nov 08: Fix indent after :silent! function (D. Kearns via #16009)

# NOTE: Whenever you change the code, make sure the tests are still passing:
#
Expand Down Expand Up @@ -295,7 +296,7 @@ patterns = []
endfor
}

const STARTS_NAMED_BLOCK: string = $'^\s*\%(sil\%[ent]\s\+\)\=\%({patterns->join('\|')}\)\>\%(\s\|$\|!\)\@='
const STARTS_NAMED_BLOCK: string = $'^\s*\%(sil\%[ent]!\=\s\+\)\=\%({patterns->join('\|')}\)\>\%(\s\|$\|!\)\@='

# STARTS_CURLY_BLOCK {{{3

Expand Down
56 changes: 28 additions & 28 deletions runtime/autoload/getscript.vim
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
" 2024 Sep 23 by Vim Project: runtime dir selection fix (#15722)
" autoloading search path fix
" substitution of hardcoded commands with global variables
" 2024 Nov 12 by Vim Project: fix problems on Windows (#16036)
" }}}
"
" GetLatestVimScripts: 642 1 :AutoInstall: getscript.vim
Expand All @@ -27,9 +28,9 @@ if &cp
echoerr "GetLatestVimScripts is not vi-compatible; not loaded (you need to set nocp)"
finish
endif
if v:version < 702
if v:version < 901
echohl WarningMsg
echo "***warning*** this version of GetLatestVimScripts needs vim 7.2"
echo "***warning*** this version of GetLatestVimScripts needs vim 9.1"
echohl Normal
finish
endif
Expand Down Expand Up @@ -57,6 +58,9 @@ endif
if !exists("g:GetLatestVimScripts_wget")
if executable("wget")
let g:GetLatestVimScripts_wget= "wget"
elseif executable("curl.exe")
" enforce extension: windows powershell desktop version has a curl alias that hides curl.exe
let g:GetLatestVimScripts_wget= "curl.exe"
elseif executable("curl")
let g:GetLatestVimScripts_wget= "curl"
else
Expand All @@ -69,7 +73,7 @@ endif
if !exists("g:GetLatestVimScripts_options")
if g:GetLatestVimScripts_wget == "wget"
let g:GetLatestVimScripts_options= "-q -O"
elseif g:GetLatestVimScripts_wget == "curl"
elseif g:GetLatestVimScripts_wget =~ "curl"
let g:GetLatestVimScripts_options= "-s -o"
else
let g:GetLatestVimScripts_options= ""
Expand Down Expand Up @@ -121,11 +125,14 @@ if g:GetLatestVimScripts_allowautoinstall
let s:dotvim= s:is_windows ? "vimfiles" : ".vim"

if !exists("g:GetLatestVimScripts_mv")
if s:is_windows && &shell !~ '\cbash\|pwsh\|powershell'
if &shell =~? '\<pwsh\>\|\<powershell\>'
let g:GetLatestVimScripts_mv= "move -Force"
elseif s:is_windows && &shell =~? '\<cmd\>'
" windows (but not cygwin/bash)
let g:GetLatestVimScripts_mv= "move"
let g:GetLatestVimScripts_mv= "move /Y"
else
" unix
" unix or cygwin bash/zsh
" 'mv' overrides existing files without asking
let g:GetLatestVimScripts_mv= "mv"
endif
endif
Expand Down Expand Up @@ -160,12 +167,6 @@ fun! getscript#GetLatestVimScripts()
return
endif

" insure that fnameescape() is available
if !exists("*fnameescape")
echoerr "GetLatestVimScripts needs fnameescape() (provided by 7.1.299 or later)"
return
endif

" Find the .../GetLatest subdirectory under the runtimepath
for datadir in split(&rtp,',') + ['']
if isdirectory(datadir."/GetLatest")
Expand Down Expand Up @@ -377,7 +378,16 @@ fun! s:GetOneScript(...)
let t_ti= &t_ti
let t_te= &t_te
let rs = &rs
let ssl = &ssl

set t_ti= t_te= nors
" avoid issues with shellescape() on Windows
if s:is_windows && &shell =~? '\<cmd\>'
set noshellslash
endif

" restore valures afterwards
defer execute("let @a = rega | let &t_ti = t_ti | let &t_te = t_te | let &rs = rs | let &ssl = ssl")

" put current line on top-of-screen and interpret it into
" a script identifier : used to obtain webpage
Expand All @@ -394,7 +404,6 @@ fun! s:GetOneScript(...)
else
let curline = getline(".")
if curline =~ '^\s*#'
let @a= rega
" call Dret("GetOneScript : skipping a pure comment line")
return
endif
Expand Down Expand Up @@ -429,7 +438,6 @@ fun! s:GetOneScript(...)
" plugin author protection from downloading his/her own scripts atop their latest work
if scriptid == 0 || srcid == 0
" When looking for :AutoInstall: lines, skip scripts that have 0 0 scriptname
let @a= rega
" call Dret("GetOneScript : skipping a scriptid==srcid==0 line")
return
endif
Expand Down Expand Up @@ -497,7 +505,6 @@ fun! s:GetOneScript(...)
" call Decho("***warning*** couldn'".'t find "Click on the package..." in description page for <'.aicmmnt.">")
echomsg "***warning*** couldn'".'t find "Click on the package..." in description page for <'.aicmmnt.">"
" call Dret("GetOneScript : srch for /Click on the package/ failed")
let @a= rega
return
endif
" call Decho('found "Click on the package to download"')
Expand All @@ -513,7 +520,6 @@ fun! s:GetOneScript(...)
let s:downerrors = s:downerrors + 1
" call Decho("***warning*** couldn'".'t find "src_id=" in description page for <'.aicmmnt.">")
echomsg "***warning*** couldn'".'t find "src_id=" in description page for <'.aicmmnt.">"
let @a= rega
" call Dret("GetOneScript : srch for /src_id/ failed")
return
endif
Expand Down Expand Up @@ -547,11 +553,11 @@ fun! s:GetOneScript(...)
" call Decho(".downloading new <".sname.">")
echomsg ".downloading new <".sname.">"
if has("win32") || has("win16") || has("win95")
" call Decho(".new|exe silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape(g:GetLatestVimScripts_downloadaddr.latestsrcid)."|q")
new|exe "silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape(g:GetLatestVimScripts_downloadaddr.latestsrcid)|q
" call Decho(".new|exe silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape(g:GetLatestVimScripts_downloadaddr.latestsrcid)."|bw!")
new|exe "silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape(g:GetLatestVimScripts_downloadaddr.latestsrcid)|bw!
else
" call Decho(".exe silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape(g:GetLatestVimScripts_downloadaddr).latestsrcid
exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape(g:GetLatestVimScripts_downloadaddr).latestsrcid
" call Decho(".exe silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape(g:GetLatestVimScripts_downloadaddr.latestsrcid)
exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape(g:GetLatestVimScripts_downloadaddr.latestsrcid)
endif

" --------------------------------------------------------------------------
Expand Down Expand Up @@ -654,8 +660,8 @@ fun! s:GetOneScript(...)
exe "silent !".g:GetLatestVimScripts_mv." ".shellescape(sname)." ".installdir
endif
if tgtdir != "plugin"
" call Decho("exe silent !".g:GetLatestVimScripts_mv." plugin/".shellescape(pname)." ".tgtdir)
exe "silent !".g:GetLatestVimScripts_mv." plugin/".shellescape(pname)." ".tgtdir
" call Decho("exe silent !".g:GetLatestVimScripts_mv." ".shellescape("plugin/".pname)." ".tgtdir)
exe "silent !".g:GetLatestVimScripts_mv." ".shellescape("plugin/".pname)." ".tgtdir
endif

" helptags step
Expand All @@ -680,13 +686,7 @@ fun! s:GetOneScript(...)
" call Decho("[latestsrcid=".latestsrcid."] <= [srcid=".srcid."], no need to update")
endif

" restore options
let &t_ti = t_ti
let &t_te = t_te
let &rs = rs
let @a = rega
" call Dredir("BUFFER TEST (GetOneScript)","ls!")

" call Dret("GetOneScript")
endfun

Expand Down
Loading

0 comments on commit d25ae00

Please sign in to comment.