Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into tabsidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
rbtnn committed Sep 19, 2024
2 parents e67be29 + 35699f1 commit fe2be8c
Show file tree
Hide file tree
Showing 70 changed files with 1,044 additions and 528 deletions.
7 changes: 7 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,10 @@ freebsd_task:
- pw useradd cirrus -m
- chown -R cirrus:cirrus .
- sudo -u cirrus make test
on_failure:
screendump_artifacts:
name: "Cirrus-CI-freebsd-failed-tests"
path: |
"$CIRRUS_WORKING_DIR/runtime/syntax/testdir/failed/*"
"$CIRRUS_WORKING_DIR/src/testdir/failed/*"
type: application/octet-stream
3 changes: 2 additions & 1 deletion runtime/autoload/netrw.vim
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
" 2024 Aug 22 by Vim Project: fix mf-selection highlight (#15551)
" 2024 Aug 22 by Vim Project: adjust echo output of mx command (#15550)
" 2024 Sep 15 by Vim Project: more strict confirmation dialog (#15680)
" 2024 Sep 19 by Vim Project: mf-selection highlight uses wrong pattern (#15700)
" }}}
" Former Maintainer: Charles E Campbell
" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
Expand Down Expand Up @@ -6890,7 +6891,7 @@ fun! s:NetrwMarkFile(islocal,fname)

let ykeep = @@
let curbufnr= bufnr("%")
let leader= '\(^\|\s\)\zs'
let leader= '\%(^\|\s\)\zs'
if a:fname =~ '\a$'
let trailer = '\>[@=|\/\*]\=\ze\%( \|\t\|$\)'
else
Expand Down
5 changes: 3 additions & 2 deletions runtime/doc/syntax.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*syntax.txt* For Vim version 9.1. Last change: 2024 Sep 11
*syntax.txt* For Vim version 9.1. Last change: 2024 Sep 18


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -2176,10 +2176,11 @@ cycles for such a feature to become either integrated into the platform or
withdrawn from this effort. To cater for early adopters, there is optional
support in Vim for syntax related preview features that are implemented. You
can request it by specifying a list of preview feature numbers as follows: >
:let g:java_syntax_previews = [430]
:let g:java_syntax_previews = [455]
The supported JEP numbers are to be drawn from this table:
`430`: String Templates [JDK 21]
`455`: Primitive types in Patterns, instanceof, and switch

Note that as soon as the particular preview feature will have been integrated
into the Java platform, its entry will be removed from the table and related
Expand Down
22 changes: 7 additions & 15 deletions runtime/ftplugin/gpg.vim
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: gpg(1) configuration file
" Previous Maintainer: Nikolai Weibull <[email protected]>
" Latest Revision: 2023-10-07
" Latest Revision: 2024-09-19 (simplify keywordprg #15696)

if exists("b:did_ftplugin")
finish
Expand All @@ -15,20 +15,12 @@ let b:undo_ftplugin = "setl com< cms< fo<"

setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql

if has('unix') && executable('less')
if !has('gui_running')
command -buffer -nargs=1 GpgKeywordPrg
\ silent exe '!' . 'LESS= MANPAGER="less --pattern=''^\s+--' . <q-args> . '\b'' --hilite-search" man ' . 'gpg' |
\ redraw!
elseif has('terminal')
command -buffer -nargs=1 GpgKeywordPrg
\ silent exe ':term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('^\s+--' . <q-args> . '\b', '\') . ''' --hilite-search" man ' . 'gpg'
endif
if exists(':GpgKeywordPrg') == 2
setlocal iskeyword+=-
setlocal keywordprg=:GpgKeywordPrg
let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer GpgKeywordPrg'
endif
if has('unix') && executable('less') && exists(':terminal') == 2
command -buffer -nargs=1 GpgKeywordPrg
\ silent exe ':term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('^\s+--' . <q-args> . '\b', '\') . ''' --hilite-search" man ' . 'gpg'
setlocal iskeyword+=-
setlocal keywordprg=:GpgKeywordPrg
let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer GpgKeywordPrg'
endif

let &cpo = s:cpo_save
Expand Down
23 changes: 8 additions & 15 deletions runtime/ftplugin/modconf.vim
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: modules.conf(5) configuration file
" Previous Maintainer: Nikolai Weibull <[email protected]>
" Latest Revision: 2023-10-07
" Latest Revision: 2024-09-19 (simplify keywordprg #15696)

if exists("b:did_ftplugin")
finish
Expand All @@ -16,20 +16,13 @@ let b:undo_ftplugin = "setl com< cms< inc< fo<"
setlocal comments=:# commentstring=#\ %s include=^\\s*include
setlocal formatoptions-=t formatoptions+=croql

if has('unix') && executable('less')
if !has('gui_running')
command -buffer -nargs=1 ModconfKeywordPrg
\ silent exe '!' . 'LESS= MANPAGER="less --pattern=''^\s{,8}' . <q-args> . '\b'' --hilite-search" man ' . 'modprobe.d' |
\ redraw!
elseif has('terminal')
command -buffer -nargs=1 ModconfKeywordPrg
\ silent exe ':term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('^\s{,8}' . <q-args> . '\b', '\') . ''' --hilite-search" man ' . 'modprobe.d'
endif
if exists(':ModconfKeywordPrg') == 2
setlocal iskeyword+=-
setlocal keywordprg=:ModconfKeywordPrg
let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer ModconfKeywordPrg'
endif
if has('unix') && executable('less') && exists(':terminal') == 2
command -buffer -nargs=1 ModconfKeywordPrg
\ silent exe ':term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('^\s{,8}' . <q-args> . '\b', '\') . ''' --hilite-search" man ' . 'modprobe.d'
setlocal iskeyword+=-
setlocal keywordprg=:ModconfKeywordPrg
let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer ModconfKeywordPrg'
endif
endif

let &cpo = s:cpo_save
Expand Down
22 changes: 7 additions & 15 deletions runtime/ftplugin/muttrc.vim
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: mutt RC File
" Previous Maintainer: Nikolai Weibull <[email protected]>
" Latest Revision: 2023-10-07
" Latest Revision: 2024-09-19 (simplify keywordprg #15696)

if exists("b:did_ftplugin")
finish
Expand All @@ -18,20 +18,12 @@ setlocal formatoptions-=t formatoptions+=croql

let &l:include = '^\s*source\>'

if has('unix') && executable('less')
if !has('gui_running')
command -buffer -nargs=1 MuttrcKeywordPrg
\ silent exe '!' . 'LESS= MANPAGER="less --pattern=''^\s+' . <q-args> . '\b'' --hilite-search" man ' . 'muttrc' |
\ redraw!
elseif has('terminal')
command -buffer -nargs=1 MuttrcKeywordPrg
\ silent exe 'term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('^\s+' . <q-args> . '\b', '\') . ''' --hilite-search" man ' . 'muttrc'
endif
if exists(':MuttrcKeywordPrg') == 2
setlocal iskeyword+=-
setlocal keywordprg=:MuttrcKeywordPrg
let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer MuttrcKeywordPrg'
endif
if has('unix') && executable('less') && exists(':terminal') == 2
command -buffer -nargs=1 MuttrcKeywordPrg
\ silent exe 'term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('^\s+' . <q-args> . '\b', '\') . ''' --hilite-search" man ' . 'muttrc'
setlocal iskeyword+=-
setlocal keywordprg=:MuttrcKeywordPrg
let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer MuttrcKeywordPrg'
endif

let &cpo = s:cpo_save
Expand Down
18 changes: 8 additions & 10 deletions runtime/ftplugin/ps1.vim
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
" Last Change: 2021 Apr 02
" 2024 Jan 14 by Vim Project (browsefilter)
" 2024 May 23 by Riley Bruins <[email protected]> ('commentstring')
" 2024 Sep 19 by Konfekt (simplify keywordprg #15696)

" Only do this when not done yet for this buffer
if exists("b:did_ftplugin") | finish | endif
Expand Down Expand Up @@ -35,6 +36,10 @@ if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
endif
endif

" Undo the stuff we changed
let b:undo_ftplugin = "setlocal tw< cms< fo< iskeyword<" .
\ " | unlet! b:browsefilter"

" Look up keywords by Get-Help:
" check for PowerShell Core in Windows, Linux or MacOS
if executable('pwsh') | let s:pwsh_cmd = 'pwsh'
Expand All @@ -45,21 +50,14 @@ elseif executable('powershell.exe') | let s:pwsh_cmd = 'powershell.exe'
endif

if exists('s:pwsh_cmd')
if !has('gui_running') && executable('less') &&
\ !(exists('$ConEmuBuild') && &term =~? '^xterm')
" For exclusion of ConEmu, see https://github.com/Maximus5/ConEmu/issues/2048
command! -buffer -nargs=1 GetHelp silent exe '!' . s:pwsh_cmd . ' -NoLogo -NoProfile -NonInteractive -ExecutionPolicy RemoteSigned -Command Get-Help -Full "<args>" | ' . (has('unix') ? 'LESS= less' : 'less') | redraw!
elseif has('terminal')
if exists(':terminal') == 2
command! -buffer -nargs=1 GetHelp silent exe 'term ' . s:pwsh_cmd . ' -NoLogo -NoProfile -NonInteractive -ExecutionPolicy RemoteSigned -Command Get-Help -Full "<args>"' . (executable('less') ? ' | less' : '')
else
command! -buffer -nargs=1 GetHelp echo system(s:pwsh_cmd . ' -NoLogo -NoProfile -NonInteractive -ExecutionPolicy RemoteSigned -Command Get-Help -Full <args>')
endif
setlocal keywordprg=:GetHelp
let b:undo_ftplugin ..= " | setl kp< | sil! delc -buffer GetHelp"
endif
setlocal keywordprg=:GetHelp

" Undo the stuff we changed
let b:undo_ftplugin = "setlocal tw< cms< fo< iskeyword< keywordprg<" .
\ " | unlet! b:browsefilter"

let &cpo = s:cpo_save
unlet s:cpo_save
22 changes: 7 additions & 15 deletions runtime/ftplugin/readline.vim
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
" Language: readline(3) configuration file
" Maintainer: Doug Kearns <[email protected]>
" Previous Maintainer: Nikolai Weibull <[email protected]>
" Last Change: 2023 Aug 22
" Last Change: 2024 Sep 19 (simplify keywordprg #15696)

if exists("b:did_ftplugin")
finish
Expand Down Expand Up @@ -34,20 +34,12 @@ if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:undo_ftplugin ..= " | unlet! b:browsefilter"
endif

if has('unix') && executable('less')
if !has('gui_running')
command -buffer -nargs=1 ReadlineKeywordPrg
\ silent exe '!' . 'LESS= MANPAGER="less --pattern=''^\s+' . <q-args> . '\b'' --hilite-search" man ' . '3 readline' |
\ redraw!
elseif has('terminal')
command -buffer -nargs=1 ReadlineKeywordPrg
\ silent exe 'term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('^\s+' . <q-args> . '\b', '\') . ''' --hilite-search" man ' . '3 readline'
endif
if exists(':ReadlineKeywordPrg') == 2
setlocal iskeyword+=-
setlocal keywordprg=:ReadlineKeywordPrg
let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer ReadlineKeywordPrg'
endif
if has('unix') && executable('less') && exists(':terminal') == 2
command -buffer -nargs=1 ReadlineKeywordPrg
\ silent exe 'term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('^\s+' . <q-args> . '\b', '\') . ''' --hilite-search" man ' . '3 readline'
setlocal iskeyword+=-
setlocal keywordprg=:ReadlineKeywordPrg
let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer ReadlineKeywordPrg'
endif

let &cpo = s:cpo_save
Expand Down
11 changes: 7 additions & 4 deletions runtime/ftplugin/sh.vim
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
" Previous Maintainer: Dan Sharp
" Contributor: Enno Nagel <[email protected]>
" Eisuke Kawashima
" Last Change: 2024 May 06 by Vim Project (MANPAGER=)
" Last Change: 2024 Sep 19 by Vim Project (compiler shellcheck)

if exists("b:did_ftplugin")
finish
Expand Down Expand Up @@ -45,15 +45,18 @@ if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
endif

if get(b:, "is_bash", 0)
if !has("gui_running") && executable("less")
command! -buffer -nargs=1 ShKeywordPrg silent exe '!bash -c "{ help "<args>" 2>/dev/null || MANPAGER= man "<args>"; } | LESS= less"' | redraw!
elseif has("terminal")
if exists(':terminal') == 2
command! -buffer -nargs=1 ShKeywordPrg silent exe ':term bash -c "help "<args>" 2>/dev/null || man "<args>""'
else
command! -buffer -nargs=1 ShKeywordPrg echo system('bash -c "help <args>" 2>/dev/null || MANPAGER= man "<args>"')
endif
setlocal keywordprg=:ShKeywordPrg
let b:undo_ftplugin ..= " | setl kp< | sil! delc -buffer ShKeywordPrg"

if !exists('current_compiler')
compiler shellcheck
endif
let b:undo_ftplugin .= ' | compiler make'
endif

let &cpo = s:save_cpo
Expand Down
27 changes: 10 additions & 17 deletions runtime/ftplugin/sshconfig.vim
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
" Vim filetype plugin file
" Language: OpenSSH client configuration file
" Previous Maintainer: Nikolai Weibull <[email protected]>
" Latest Revision: 2023-10-07
" Language: OpenSSH client configuration file
" Maintainer: This runtime file is looking for a new maintainer.
" Previous Maintainer: Nikolai Weibull <[email protected]>
" Latest Revision: 2024-09-19 (simplify keywordprg #15696)

if exists("b:did_ftplugin")
finish
Expand All @@ -14,20 +15,12 @@ set cpo&vim
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
let b:undo_ftplugin = 'setlocal com< cms< fo<'

if has('unix') && executable('less')
if !has('gui_running')
command -buffer -nargs=1 SshconfigKeywordPrg
\ silent exe '!' . 'LESS= MANPAGER="less --pattern=''^\s+' . <q-args> . '$'' --hilite-search" man ' . 'ssh_config' |
\ redraw!
elseif has('terminal')
command -buffer -nargs=1 SshconfigKeywordPrg
\ silent exe 'term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('^\s+' . <q-args> . '$', '\') . ''' --hilite-search" man ' . 'ssh_config'
endif
if exists(':SshconfigKeywordPrg') == 2
setlocal iskeyword+=-
setlocal keywordprg=:SshconfigKeywordPrg
let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer SshconfigKeywordPrg'
endif
if has('unix') && executable('less') && exists(':terminal') == 2
command -buffer -nargs=1 SshconfigKeywordPrg
\ silent exe 'term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('^\s+' . <q-args> . '$', '\') . ''' --hilite-search" man ' . 'ssh_config'
setlocal iskeyword+=-
setlocal keywordprg=:SshconfigKeywordPrg
let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer SshconfigKeywordPrg'
endif

let &cpo = s:cpo_save
Expand Down
27 changes: 10 additions & 17 deletions runtime/ftplugin/sudoers.vim
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
" Vim filetype plugin file
" Language: sudoers(5) configuration files
" Previous Maintainer: Nikolai Weibull <[email protected]>
" Latest Revision: 2023-10-07
" Language: sudoers(5) configuration files
" Maintainer: This runtime file is looking for a new maintainer.
" Previous Maintainer: Nikolai Weibull <[email protected]>
" Latest Revision: 2024-09-19 (simplify keywordprg #15696)

if exists("b:did_ftplugin")
finish
Expand All @@ -15,20 +16,12 @@ let b:undo_ftplugin = "setl com< cms< fo<"

setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql

if has('unix') && executable('less')
if !has('gui_running')
command -buffer -nargs=1 SudoersKeywordPrg
\ silent exe '!' . 'LESS= MANPAGER="less --pattern=''\b' . <q-args> . '\b'' --hilite-search" man ' . 'sudoers' |
\ redraw!
elseif has('terminal')
command -buffer -nargs=1 SudoersKeywordPrg
\ silent exe ':term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('\b' . <q-args> . '\b', '\') . ''' --hilite-search" man ' . 'sudoers'
endif
if exists(':SudoersKeywordPrg') == 2
setlocal iskeyword+=-
setlocal keywordprg=:SudoersKeywordPrg
let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer SudoersKeywordPrg'
endif
if has('unix') && executable('less') && exists(':terminal') == 2
command -buffer -nargs=1 SudoersKeywordPrg
\ silent exe ':term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('\b' . <q-args> . '\b', '\') . ''' --hilite-search" man ' . 'sudoers'
setlocal iskeyword+=-
setlocal keywordprg=:SudoersKeywordPrg
let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer SudoersKeywordPrg'
endif

let &cpo = s:cpo_save
Expand Down
40 changes: 16 additions & 24 deletions runtime/ftplugin/systemd.vim
Original file line number Diff line number Diff line change
@@ -1,38 +1,30 @@
" Vim filetype plugin file
" Language: systemd.unit(5)
" Keyword Lookup Support: Enno Nagel <[email protected]>
" Latest Revision: 2023-10-07
" Latest Revision: 2024-09-19 (simplify keywordprg #15696)

if exists("b:did_ftplugin")
finish
endif
" Looks a lot like dosini files.
runtime! ftplugin/dosini.vim

if has('unix') && executable('less')
if !has('gui_running')
command -buffer -nargs=1 SystemdKeywordPrg silent exe '!' . KeywordLookup_systemd(<q-args>) | redraw!
elseif has('terminal')
command -buffer -nargs=1 SystemdKeywordPrg silent exe 'term ' . KeywordLookup_systemd(<q-args>)
endif
if exists(':SystemdKeywordPrg') == 2
if !exists('*KeywordLookup_systemd')
function KeywordLookup_systemd(keyword) abort
let matches = matchlist(getline(search('\v^\s*\[\s*.+\s*\]\s*$', 'nbWz')), '\v^\s*\[\s*(\k+).*\]\s*$')
if len(matches) > 1
let section = matches[1]
return 'LESS= MANPAGER="less --pattern=''(^|,)\s+' . a:keyword . '=$'' --hilite-search" man ' . 'systemd.' . section
else
return 'LESS= MANPAGER="less --pattern=''(^|,)\s+' . a:keyword . '=$'' --hilite-search" man ' . 'systemd'
endif
endfunction
endif
setlocal iskeyword+=-
setlocal keywordprg=:SystemdKeywordPrg
if !exists('b:undo_ftplugin') || empty(b:undo_ftplugin)
let b:undo_ftplugin = 'setlocal keywordprg< iskeyword<'
if has('unix') && executable('less') && exists(':terminal') == 2
command -buffer -nargs=1 SystemdKeywordPrg silent exe 'term ' . KeywordLookup_systemd(<q-args>)
silent! function KeywordLookup_systemd(keyword) abort
let matches = matchlist(getline(search('\v^\s*\[\s*.+\s*\]\s*$', 'nbWz')), '\v^\s*\[\s*(\k+).*\]\s*$')
if len(matches) > 1
let section = matches[1]
return 'LESS= MANPAGER="less --pattern=''(^|,)\s+' . a:keyword . '=$'' --hilite-search" man ' . 'systemd.' . section
else
let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer SystemdKeywordPrg'
return 'LESS= MANPAGER="less --pattern=''(^|,)\s+' . a:keyword . '=$'' --hilite-search" man ' . 'systemd'
endif
endfunction
setlocal iskeyword+=-
setlocal keywordprg=:SystemdKeywordPrg
if !exists('b:undo_ftplugin') || empty(b:undo_ftplugin)
let b:undo_ftplugin = 'setlocal keywordprg< iskeyword<'
else
let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer SystemdKeywordPrg'
endif
endif
Loading

0 comments on commit fe2be8c

Please sign in to comment.