diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:05:53 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:05:53 +0000 |
commit | e3cd7b5397bcd3f4989801896ec483f31393ca04 (patch) | |
tree | 587a4cad1e5abe7e9c3760c0278632f65bb25e88 | |
parent | Releasing progress-linux version 2:9.1.0698-1~progress7.99u1. (diff) | |
download | vim-e3cd7b5397bcd3f4989801896ec483f31393ca04.tar.xz vim-e3cd7b5397bcd3f4989801896ec483f31393ca04.zip |
Merging upstream version 2:9.1.0709.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
48 files changed, 414 insertions, 200 deletions
diff --git a/.github/MAINTAINERS b/.github/MAINTAINERS index 38ab300..9c2923f 100644 --- a/.github/MAINTAINERS +++ b/.github/MAINTAINERS @@ -213,6 +213,7 @@ runtime/ftplugin/nginx.vim @chr4 runtime/ftplugin/nim.vim @ribru17 runtime/ftplugin/nroff.vim @a-vrma runtime/ftplugin/nsis.vim @k-takata +runtime/ftplugin/nu.vim @mrcjkb runtime/ftplugin/octave.vim @dkearns runtime/ftplugin/ondir.vim @jparise runtime/ftplugin/openvpn.vim @ObserverOfTime diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index edad08a..905eb49 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -105,6 +105,7 @@ jobs: libtool-bin \ libncurses-dev:${{ matrix.architecture }} \ libxt-dev:${{ matrix.architecture }} \ + locales-all \ ) if ${{ matrix.features == 'huge' }}; then LUA_VER=${{ matrix.lua_ver || '5.4' }} diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt index 432a986..c382926 100644 --- a/runtime/doc/map.txt +++ b/runtime/doc/map.txt @@ -1,4 +1,4 @@ -*map.txt* For Vim version 9.1. Last change: 2024 Jul 11 +*map.txt* For Vim version 9.1. Last change: 2024 Aug 31 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1624,12 +1624,14 @@ completion can be enabled: -complete=arglist file names in argument list -complete=augroup autocmd groups + -complete=behave |:behave| suboptions + -complete=breakpoint |:breakadd| suboptions -complete=buffer buffer names - -complete=behave :behave suboptions -complete=color color schemes -complete=command Ex command (and arguments) -complete=compiler compilers -complete=cscope |:cscope| suboptions + -complete=diff_buffer diff buffer names -complete=dir directory names -complete=dir_in_path directory names in |'cdpath'| -complete=environment environment variable names @@ -1641,7 +1643,7 @@ completion can be enabled: -complete=function function name -complete=help help subjects -complete=highlight highlight groups - -complete=history :history suboptions + -complete=history |:history| suboptions -complete=keymap keyboard mappings -complete=locale locale names (as output of locale -a) -complete=mapclear buffer argument @@ -1650,6 +1652,8 @@ completion can be enabled: -complete=messages |:messages| suboptions -complete=option options -complete=packadd optional package |pack-add| names + -complete=runtime file and directory names in |'runtimepath'| + -complete=scriptnames sourced script names -complete=shellcmd Shell command -complete=sign |:sign| suboptions -complete=syntax syntax file names |'syntax'| diff --git a/runtime/doc/motion.txt b/runtime/doc/motion.txt index 3e45884..62947c0 100644 --- a/runtime/doc/motion.txt +++ b/runtime/doc/motion.txt @@ -1,4 +1,4 @@ -*motion.txt* For Vim version 9.1. Last change: 2024 Jul 14 +*motion.txt* For Vim version 9.1. Last change: 2024 Aug 28 VIM REFERENCE MANUAL by Bram Moolenaar @@ -364,11 +364,11 @@ gg Goto line [count], default first line, on the first See also 'startofline' option. :[range]go[to] [count] *:go* *:goto* *go* -[count]go Go to [count] byte in the buffer. Default [count] is - one, start of the file. When giving [range], the - last number in it used as the byte count. End-of-line - characters are counted depending on the current - 'fileformat' setting. +[count]go Go to [count] byte in the buffer. |exclusive| motion. + Default [count] is one, start of the file. When + giving [range], the last number in it used as the byte + count. End-of-line characters are counted depending + on the current 'fileformat' setting. Also see the |line2byte()| function, and the 'o' option in 'statusline'. {not available when compiled without the diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 736e664..910aee5 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1,4 +1,4 @@ -*syntax.txt* For Vim version 9.1. Last change: 2024 Aug 22 +*syntax.txt* For Vim version 9.1. Last change: 2024 Aug 31 VIM REFERENCE MANUAL by Bram Moolenaar @@ -179,8 +179,7 @@ add a few items or change the highlighting, follow these steps: 1. Create your user directory from 'runtimepath', see above. 2. Create a directory in there called "after/syntax". For Unix: > - mkdir ~/.vim/after - mkdir ~/.vim/after/syntax + mkdir -p ~/.vim/after/syntax 3. Write a Vim script that contains the commands you want to use. For example, to change the colors for the C syntax: > @@ -2164,6 +2163,22 @@ This will make the syntax synchronization start 50 lines before the first displayed line. The default value is 10. The disadvantage of using a larger number is that redrawing can become slow. +Significant changes to the Java platform are gradually introduced in the form +of JDK Enhancement Proposals (JEPs) that can be implemented for a release and +offered as its preview features. It may take several JEPs and a few release +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] + +The supported JEP numbers are to be drawn from this table: + `430`: String Templates [JDK 21] + +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 +optionality will be discontinued. + JSON *json.vim* *ft-json-syntax* *g:vim_json_conceal* *g:vim_json_warnings* diff --git a/runtime/ftplugin/nu.vim b/runtime/ftplugin/nu.vim new file mode 100644 index 0000000..9efbc3b --- /dev/null +++ b/runtime/ftplugin/nu.vim @@ -0,0 +1,13 @@ +" Vim filetype plugin +" Language: Nu +" Maintainer: Marc Jakobi <marc@jakobi.dev> +" Last Change: 2024 Aug 31 + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 + +setlocal commentstring=#\ %s + +let b:undo_ftplugin = 'setl com<' diff --git a/runtime/lang/menu_pt_br.vim b/runtime/lang/menu_pt_br.vim index 6f5b043..66ba3a2 100644 --- a/runtime/lang/menu_pt_br.vim +++ b/runtime/lang/menu_pt_br.vim @@ -1,7 +1,7 @@ " Menu Translations: Português do Brasil " Maintainer: José de Paula <jose@infoviaweb.com> " Contributor: JNylson <nylsinho_ba@hotmail.com> -" Last Change: 2024 Ago 23 +" Last Change: 2024 Ago 29 " Original translations " Quit when menu translations have already been done. @@ -20,13 +20,13 @@ if &enc != "cp1252" && &enc != "iso-8859-15" endif " Help menu -menutrans &Help A&juda +menutrans &Help Aj&uda menutrans &Overview<Tab><F1> &Conteúdo menutrans &User\ Manual &Manual\ do\ Usuário -menutrans &How-to\ links &Como\ fazer? +menutrans &How-To\ Links Como\ &fazer? menutrans &Find\.\.\. &Procurar\.\.\. -menutrans &Credits &Créditos -menutrans O&rphans &Órfãos +menutrans &Credits C&réditos +menutrans O&rphans Órfã&os menutrans Co&pying &Licença menutrans &Sponsor/Register &Doar/Registrar menutrans &Version &Versão @@ -34,18 +34,18 @@ menutrans &About &Sobre " File menu menutrans &File &Arquivo -menutrans &Open\.\.\.<Tab>:e A&brir\.\.\.<Tab>:e -menutrans Sp&lit-Open\.\.\.<Tab>:sp Ab&rir\ em\ outra\ janela\.\.\.<Tab>:sp +menutrans &Open\.\.\.<Tab>:e &Abrir\.\.\.<Tab>:e +menutrans Sp&lit-Open\.\.\.<Tab>:sp Abrir\ em\ outra\ &janela\.\.\.<Tab>:sp menutrans Open\ &Tab\.\.\.<Tab>:tabnew A&brir\ em\ outra\ aba\.\.\.<Tab>:tabnew menutrans &New<Tab>:enew &Novo<Tab>:enew menutrans &Close<Tab>:close &Fechar<Tab>:close menutrans &Save<Tab>:w &Salvar<Tab>:w -menutrans Save\ &As\.\.\.<Tab>:sav Sa&lvar\ como\.\.\.<Tab>:sav +menutrans Save\ &As\.\.\.<Tab>:sav Salvar\ &como\.\.\.<Tab>:sav menutrans Split\ &Diff\ with\.\.\. &Exibir\ diferenças\ com\.\.\. -menutrans Split\ Patched\ &By\.\.\. Ex&ibir\ patcheado\ por\.\.\. +menutrans Split\ Patched\ &By\.\.\. E&xibir\ patcheado\ por\.\.\. menutrans &Print I&mprimir menutrans Sa&ve-Exit<Tab>:wqa Sal&var\ e\ sair<Tab>:wqa -menutrans E&xit<Tab>:qa Sai&r<Tab>:qa +menutrans E&xit<Tab>:qa Sa&ir<Tab>:qa " Edit menu menutrans &Edit &Editar @@ -56,19 +56,20 @@ menutrans Cu&t<Tab>"+x Re&cortar<Tab>"+x menutrans &Copy<Tab>"+y Cop&iar<Tab>"+y menutrans &Paste<Tab>"+gP C&olar<Tab>"+gP menutrans Put\ &Before<Tab>[p Colocar\ &antes<Tab>[p -menutrans Put\ &After<Tab>]p Colocar\ &depois<Tab>]p +menutrans Put\ &After<Tab>]p Co&locar\ depois<Tab>]p menutrans &Delete<Tab>x Apa&gar<Tab>x menutrans &Select\ all<Tab>ggVG &Selecionar\ tudo<Tab>ggVG menutrans &Find\.\.\. &Procurar\.\.\. +menutrans &Find<Tab>/ &Procurar<Tab>/ menutrans Find\ and\ Rep&lace\.\.\. Procurar\ e\ substit&uir\.\.\. menutrans Find\ and\ Rep&lace<Tab>:%s Procurar\ e\ substit&uir<Tab>:%s menutrans Find\ and\ Rep&lace Procurar\ e\ substit&uir menutrans Find\ and\ Rep&lace<Tab>:s Procurar\ e\ substituir<Tab>:s -menutrans Settings\ &Window &Opções -menutrans Startup\ &Settings &Inicialização +menutrans Settings\ &Window Opções\ de\ &janela +menutrans Startup\ &Settings Opções\ de\ i&nicialização " Edit/Global Settings -menutrans &Global\ Settings Opções\ &Globais +menutrans &Global\ Settings Opções\ glo&bais menutrans Toggle\ Pattern\ &Highlight<Tab>:set\ hls! Ativar/Desativar\ &Realce\ de\ Padrões<Tab>:set\ hls! menutrans Toggle\ &Ignoring\ Case<Tab>:set\ ic! Ativar/Desativar\ &Ignorar\ maiúsculas<Tab>:set\ ic! @@ -85,7 +86,7 @@ menutrans Always Sempre menutrans Toggle\ Insert\ &Mode<Tab>:set\ im! Ativar/Desativar\ Modo\ de\ In&serção<Tab>:set\ im! menutrans Toggle\ Vi\ C&ompatibility<Tab>:set\ cp! Ativar/Desativar\ Co&mpatibilidade\ com\ Vi<Tab>:set\ cp! -menutrans Search\ &Path\.\.\. Camin&ho\ de\ Busca\.\.\. +menutrans Search\ &Path\.\.\. Camin&ho\ de\ pesquisa\.\.\. menutrans Ta&g\ Files\.\.\. Arquivos\ de\ Tags\.\.\. " GUI options @@ -93,11 +94,11 @@ menutrans Toggle\ &Toolbar Ocultar/Exibir\ Barra\ de\ &Ferramentas menutrans Toggle\ &Bottom\ Scrollbar Ocultar/Exibir\ Barra\ de\ &Rolagem\ Inferior menutrans Toggle\ &Left\ Scrollbar Ocultar/Exibir\ Barra\ de\ R&olagem\ Esquerda menutrans Toggle\ &Right\ Scrollbar Ocultar/Exibir\ Barra\ de\ Ro&lagem\ Direita -let g:menutrans_path_dialog = "Indique um caminho de procura para os arquivos.\nSepare os nomes dos diretórios com uma vírgula." -let g:menutrans_tags_dialog = "Indique os nomes dos arquivos de tags.\nSepare os nomes com uma vírgula." +let g:menutrans_path_dialog = "Digite um caminho de procura para os arquivos.\nSepare os nomes dos diretórios com uma vírgula." +let g:menutrans_tags_dialog = "Digite os nomes dos arquivos de tags.\nSepare os nomes com uma vírgula." " Edit/File Settings -menutrans F&ile\ Settings Opções\ do\ &Arquivo +menutrans F&ile\ Settings Opções\ do\ ar&quivo " Boolean options menutrans Toggle\ Line\ &Numbering<Tab>:set\ nu! Ativar/Desativar\ &numeração\ de\ linhas<Tab>:set\ nu! @@ -121,7 +122,7 @@ menutrans &File\ Format\.\.\. &Formato\ do\ arquivo\.\.\. let g:menutrans_fileformat_dialog = "Selecione o formato para gravar o arquivo" let g:menutrans_fileformat_choices = " &Unix \n &Dos \n &Mac \n &Cancelar " -menutrans C&olor\ Scheme Esquema\ de\ c&ores +menutrans C&olor\ Scheme &Esquema\ de\ cores menutrans default padrão menutrans Show\ C&olor\ Schemes\ in\ Menu Mostrar\ &esquema\ de\ cores\ no\ menu menutrans Select\ Fo&nt\.\.\. Selecionar\ fo&nte\.\.\. @@ -132,9 +133,9 @@ menutrans None Nenhum " Programming menu menutrans &Tools &Ferramentas -menutrans &Jump\ to\ this\ tag<Tab>g^] &Pular\ para\ este\ tag<Tab>g^] +menutrans &Jump\ to\ this\ tag<Tab>g^] &Pular\ para\ esse\ tag<Tab>g^] menutrans Jump\ &back<Tab>^T &Voltar<Tab>^T -menutrans Build\ &Tags\ File &Construir\ Arquivo\ de\ tags +menutrans Build\ &Tags\ File &Criar\ arquivo\ de\ tags menutrans &Spelling &Ortografia menutrans &Folding &Dobra menutrans &Make<Tab>:make &Make<Tab>:make @@ -164,8 +165,9 @@ menutrans Set\ language\ to\ "en_gb" Inglês\ (en_gb) menutrans Set\ language\ to\ "en_nz" Inglês\ (en_nz) menutrans Set\ language\ to\ "en_us" Inglês\ (en_us) -menutrans &Find\ More\ Languages &Buscar\ mais\ idiomas +menutrans &Find\ More\ Languages &Procurar\ mais\ idiomas +let g:menutrans_set_lang_to = "Alterar idioma para" " Tools.Fold Menu menutrans &Enable/Disable\ folds<Tab>zi &Ativar/Desativar\ dobras<Tab>zi menutrans &View\ Cursor\ Line<Tab>zv &Ver\ linha\ do\ cursor<Tab>zv @@ -176,6 +178,12 @@ menutrans O&pen\ more\ folds<Tab>zr A&brir\ mais\ dobras<Tab>zr menutrans &Open\ all\ folds<Tab>zR Abr&ir\ todas\ as\ dobras<Tab>zR " fold method menutrans Fold\ Met&hod &Modo\ de\ dobras +menutrans M&anual &Manual +menutrans I&ndent &Indentação +menutrans E&xpression &Expressão +menutrans S&yntax &Sintaxe +menutrans &Diff Di&ff +menutrans Ma&rker Ma&rcadores menutrans Create\ &Fold<Tab>zf Criar\ &dobras<Tab>zf menutrans &Delete\ Fold<Tab>zd Remover\ d&obras<Tab>zd menutrans Delete\ &All\ Folds<Tab>zD Remover\ &todas\ as\ dobras<Tab>zD @@ -206,7 +214,7 @@ let g:menutrans_no_file = "[Sem arquivos]" " Window menu menutrans &Window &Janela -menutrans &New<Tab>^Wn N&ova<Tab>^Wn +menutrans &New<Tab>^Wn &Nova<Tab>^Wn menutrans S&plit<Tab>^Ws &Dividir<Tab>^Ws menutrans Sp&lit\ To\ #<Tab>^W^^ D&ividir\ para\ #<Tab>^W^^ menutrans Split\ &Vertically<Tab>^Wv Dividir\ &verticalmente<Tab>^Wv @@ -219,12 +227,12 @@ menutrans &Bottom<Tab>^WJ A&baixo<Tab>^WJ menutrans &Left\ side<Tab>^WH Lado\ &esquerdo<Tab>^WH menutrans &Right\ side<Tab>^WL Lado\ di&reito<Tab>^WL menutrans Rotate\ &Up<Tab>^WR &Girar\ para\ cima<Tab>^WR -menutrans Rotate\ &Down<Tab>^Wr Girar\ para\ bai&xo<Tab>^Wr +menutrans Rotate\ &Down<Tab>^Wr Girar\ para\ &baixo<Tab>^Wr menutrans &Equal\ Size<Tab>^W= Mesmo\ &Tamanho<Tab>^W= menutrans &Max\ Height<Tab>^W_ Altura\ &Máxima<Tab>^W_ -menutrans M&in\ Height<Tab>^W1_ A<ura\ Mínima<Tab>^W1_ +menutrans M&in\ Height<Tab>^W1_ &Altura\ mínima<Tab>^W1_ menutrans Max\ &Width<Tab>^W\| Larg&ura\ Máxima<Tab>^W\| -menutrans Min\ Widt&h<Tab>^W1\| Largura\ Mí&nima<Tab>^W1\| +menutrans Min\ Widt&h<Tab>^W1\| &Largura\ mínima<Tab>^W1\| " The popup menu menutrans &Undo &Desfazer @@ -232,13 +240,16 @@ menutrans Cu&t Recor&tar menutrans &Copy &Copiar menutrans &Paste Co&lar menutrans &Delete &Apagar -menutrans Select\ Blockwise Seleção\ de\ bloco +menutrans Select\ Blockwise Selecionar\ bloco\ a\ bloco menutrans Select\ &Word Selecionar\ &Palavra menutrans Select\ &Sentence Selecionar\ &frase menutrans Select\ Pa&ragraph Selecionar\ pa&rágrafo menutrans Select\ &Line Selecionar\ L&inha menutrans Select\ &Block Selecionar\ &bloco menutrans Select\ &All Selecionar\ T&udo +let g:menutrans_spell_change_ARG_to = 'Alterar\ "%s"\ para' +let g:menutrans_spell_add_ARG_to_word_list = 'Adicionar\ "%s"\ à\ lista\ de\ palavras' +let g:menutrans_spell_ignore_ARG = 'Ignorar\ "%s"' " The GUI toolbar if has("toolbar") @@ -290,14 +301,14 @@ menutrans Set\ '&filetype'\ too Ativar\ também\ &tipo\ de\ arquivo menutrans &Off &Desativar menutrans &Manual &Manual menutrans A&utomatic A&utomática -menutrans on/off\ for\ &This\ file Ativar/Desativar\ neste\ &arquivo +menutrans On/Off\ for\ &This\ file Ativar/Desativar\ nesse\ &arquivo menutrans &Show\ File\ Types\ in\ Menu Mos&trar\ tipos\ de\ arquivos\ no\ menu -menutrans Co&lor\ test T&este\ de\ cores -menutrans &Highlight\ test Teste\ de\ &realce -menutrans &Convert\ to\ HTML &Converter\ para\ HTML +menutrans Co&lor\ test T&estar\ cores +menutrans &Highlight\ test Testar\ &realce +menutrans &Convert\ to\ HTML Converter\ para\ &HTML " Find Help dialog text -let g:menutrans_help_dialog = "Digite um comando ou palavra para obter ajuda;\n\nAnteponha i_ para comandos de entrada (ex.: i_CTRL-X)\nAnteponha c_ para comandos da linha de comandos (ex.: c_<Del>)\nAnteponha ` para um nome de opção (ex.: `shiftwidth`)" +let g:menutrans_help_dialog = "Digite um comando ou palavra para obter ajuda;\n\nPreceder i_ para comandos de entrada (ex.: i_CTRL-X)\nPreceder c_ para comandos da linha de comandos (ex.: c_<Del>)\nPreceder ` para nome de opção (ex.: `shiftwidth`)" let &cpo = s:keepcpo unlet s:keepcpo diff --git a/runtime/syntax/generator/vim.vim.base b/runtime/syntax/generator/vim.vim.base index 2624798..0381208 100644 --- a/runtime/syntax/generator/vim.vim.base +++ b/runtime/syntax/generator/vim.vim.base @@ -3,7 +3,7 @@ " Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com> " Doug Kearns <dougkearns@gmail.com> " URL: https://github.com/vim-jp/syntax-vim-ex -" Last Change: 2024 Aug 23 +" Last Change: 2024 Aug 30 " Former Maintainer: Charles E. Campbell " DO NOT CHANGE DIRECTLY. @@ -478,8 +478,8 @@ syn match vimString "[^(,]'[^']\{-}\zs'" " Marks, Registers, Addresses, Filters: {{{2 syn match vimMark "'[a-zA-Z0-9]\ze[-+,!]" nextgroup=vimFilter,vimMarkNumber,vimSubst1 -syn match vimMark "'[<>]\ze[-+,!]" nextgroup=vimFilter,vimMarkNumber,vimSubst1 -syn match vimMark ",\zs'[<>]\ze" nextgroup=vimFilter,vimMarkNumber,vimSubst1 +syn match vimMark "'[[\]{}()<>]\ze[-+,!]" nextgroup=vimFilter,vimMarkNumber,vimSubst1 +syn match vimMark ",\zs'[[\]{}()<>]\ze" nextgroup=vimFilter,vimMarkNumber,vimSubst1 syn match vimMark "[!,:]\zs'[a-zA-Z0-9]" nextgroup=vimFilter,vimMarkNumber,vimSubst1 syn match vimMark "\<norm\%[al]\s\zs'[a-zA-Z0-9]" nextgroup=vimFilter,vimMarkNumber,vimSubst1 syn match vimMarkNumber "[-+]\d\+" contained contains=vimOper nextgroup=vimSubst1 diff --git a/runtime/syntax/hollywood.vim b/runtime/syntax/hollywood.vim index 7846d52..16df9fa 100644 --- a/runtime/syntax/hollywood.vim +++ b/runtime/syntax/hollywood.vim @@ -2,7 +2,7 @@ " Language: Hollywood 10.0 " Maintainer: Ola Söder <rolfkopman@gmail.com> " First Author: Tom Crecelius <holly@net-eclipse.net> -" Last Change: 2023 Mar 22 +" Last Change: 2024 Jun 20 " Highlighting Issues: " Depending on your colour schema, Strings or Comments might be highlighted in " a way, you don't like. If so, try one of the following settings after @@ -30,7 +30,7 @@ let s:cpo_save = &cpo set cpo&vim if !exists("hw_version") - let hw_version = 9 + let hw_version = 10 let hw_subversion = 0 elseif !exists("hw_subversion") let hw_subversion = 0 @@ -54,9 +54,9 @@ syn match hwError "\<\%(If\|End\|Else\|ElseIf\|Then\|Until\|In\|EndIf\|EndSwitc syn region hwFunctionBlock transparent matchgroup=hwFunction start="\<Function\>" end="\<EndFunction\>" contains=ALLBUT,hwTodo,hwSpecial,hwElseIf,hwElse,hwIn,hwStep,hwFallThrough,hwLineStatement " If .. Then -syn region hwIfThen transparent matchgroup=hwCond start="\<If\>" end="\<Then\>\{-}"me=e-4 skipwhite skipempty +syn region hwIfThen transparent matchgroup=hwCond start="\<If\>" end="\<Then\>\{-}"me=e-4 oneline skipwhite skipempty " Then ... Else -syn region hwThenElse transparent matchgroup=hwCond start="\<Then\>" end="$" end="\<Else\>" contains=ALLBUT,hwTodo,hwSpecial,hwIn,hwStep,hwLineStatement,hwIfEndIf,hwElseEndif,hwIfThen,hwThenElse skipwhite skipempty +syn region hwThenElse transparent matchgroup=hwCond start="\<Then\>" end="$" end="\<Else\>" contains=hwFunction,hwUserFunction,hwElseIf,hwStatement,hwConstant containedin=hwIfThen oneline skipwhite skipempty " If .. EndIf syn region hwIfEndIf transparent matchgroup=hwCond start="\<If\>\(\(.\{-}Then.\{-}\)\@!\)" end="\<EndIf\>" contains=ALLBUT,hwTodo,hwSpecial,hwIn,hwStep,hwLineStatement skipwhite skipempty @@ -98,6 +98,12 @@ syn region hwForTo transparent matchgroup=hwRepeat start="\<For\>" end="\<To\>"m " To .. Next syn region hwToNext transparent matchgroup=hwRepeat start="\<To\>" end="\<Next\>" contains=ALLBUT,hwTodo,hwSpecial,hwElseIf,hwElse,hwIn,hwLineStatement skipwhite skipempty +" For .. In +syn region hwForIn transparent matchgroup=hwRepeat start="\<For\>\(\(.\{-}To.\{-}\)\@!\)" end="\<In\>"me=e-2, skipwhite skipempty nextgroup=hwInNext + +" In .. Next +syn region hwInNext transparent matchgroup=hwRepeat start="\<In\>" end="\<Next\>" contains=ALLBUT,hwTodo,hwSpecial,hwElseIf,hwElse,hwLineStatement skipwhite skipempty + syn keyword hwStep contained Step syn keyword hwIn contained In @@ -116,7 +122,7 @@ syn match hwConstant "#\<\%(ACTIVEWINDOW\|ADF_ANIM\|ADF_FX\|ADF_MOVEOBJECT\|ALL\ syn keyword hwFunction Abs ACos ActivateDisplay Add AddArcToPath AddBoxToPath AddCircleToPath AddEllipseToPath AddFontPath AddIconImage AddMove AddStr AddTab AddTextToPath AllocConsoleColor AllocMem AllocMemFromPointer AllocMemFromVirtualFile AppendPath ApplyPatch Arc ArcDistortBrush ARGB ArrayToStr Asc ASin Assert AsyncDrawFrame ATan ATan2 BarrelDistortBrush Base64Str Beep BeepConsole BeginAnimStream BeginDoubleBuffer BeginRefresh BGPicToBrush BinStr BitClear BitComplement BitSet BitTest BitXor Blue BlurBrush Box BreakEventHandler BreakWhileMouseOn BrushToBGPic BrushToGray BrushToMonochrome BrushToPenArray BrushToRGBArray ByteAsc ByteChr ByteLen ByteOffset ByteStrStr ByteVal CallJavaMethod CancelAsyncDraw CancelAsyncOperation CanonizePath Cast Ceil ChangeApplicationIcon ChangeBrushTransparency ChangeDirectory ChangeDisplayMode ChangeDisplaySize ChangeInterval CharcoalBrush CharOffset CharWidth CheckEvent CheckEvents Chr Circle ClearClipboard ClearConsole ClearConsoleStyle ClearEvents ClearInterval ClearMove ClearObjectData ClearPath ClearScreen ClearSerialQueue ClearTimeout CloseAmigaGuide CloseAnim CloseAudio CloseCatalog CloseConnection CloseConsole CloseDirectory CloseDisplay CloseFile CloseFont CloseMusic ClosePath CloseResourceMonitor CloseSerialPort CloseServer CloseUDPObject CloseVideo Cls CollectGarbage Collision ColorRequest CompareDates CompareStr CompressFile Concat ConfigureJoystick ConsolePrint ConsolePrintChr ConsolePrintNR ConsolePrompt ContinueAsyncOperation ContrastBrush ContrastPalette ConvertStr ConvertToBrush CopyAnim CopyBGPic CopyBrush CopyConsoleWindow CopyFile CopyLayer CopyMem CopyObjectData CopyPalette CopyPath CopyPens CopySample CopySprite CopyTable CopyTextObject Cos CountDirectoryEntries CountJoysticks CountStr CRC32 CRC32Str CreateAnim CreateBGPic CreateBorderBrush CreateBrush CreateButton CreateClipRegion CreateConsoleWindow CreateCoroutine CreateDisplay CreateFont CreateGradientBGPic CreateGradientBrush CreateIcon CreateKeyDown CreateLayer CreateList CreateMenu CreateMusic CreatePalette CreatePointer CreatePort CreateRainbowBGPic CreateRexxPort CreateSample CreateServer CreateShadowBrush CreateShortcut CreateSprite CreateTextObject CreateTexturedBGPic CreateTexturedBrush CreateUDPObject CropBrush CtrlCQuit CurveTo CyclePalette DateToTimestamp DateToUTC DebugOutput DebugPrint DebugPrintNR DebugPrompt DebugStr DebugVal DecomposeConsoleChr DecompressFile DecreasePointer DefineVirtualFile DefineVirtualFileFromString Deg DeleteAlphaChannel DeleteButton DeleteConsoleChr DeleteConsoleLine DeleteFile DeleteMask DeletePrefs DeselectMenuItem DeserializeTable DirectoryItems DisableAdvancedConsole DisableButton DisableEvent DisableEventHandler DisableLayers DisableLineHook DisableMenuItem DisablePlugin DisablePrecalculation DisableVWait DisplayAnimFrame DisplayBGPic DisplayBGPicPart DisplayBGPicPartFX DisplayBrush DisplayBrushFX DisplayBrushPart DisplaySprite DisplayTextObject DisplayTextObjectFX DisplayTransitionFX DisplayVideoFrame Div DoMove DownloadFile DrawConsoleBorder DrawConsoleBox DrawConsoleHLine DrawConsoleVLine DrawPath DumpButtons DumpLayers DumpMem DumpVideo DumpVideoTime EdgeBrush Ellipse EmbossBrush EmptyStr EnableAdvancedConsole EnableButton EnableEvent EnableEventHandler EnableLayers EnableLineHook EnableMenuItem EnablePlugin EnablePrecalculation EnableVWait End EndDoubleBuffer EndianSwap EndRefresh EndSelect EndsWith Eof EraseConsole Error EscapeQuit Eval Execute Exists ExitOnError Exp ExtendBrush ExtractPalette FileAttributes FileLength FileLines FilePart FilePos FileRequest FileSize FileToString FillMem FillMusicBuffer FindStr FinishAnimStream FinishAsyncDraw FlashConsole Flip FlipBrush FlipSprite FloodFill Floor FlushFile FlushMusicBuffer FlushSerialPort FontRequest ForcePathUse ForceSound ForceVideoDriver ForceVideoMode ForEach ForEachI FormatConsoleLine FormatDate FormatNumber FormatStr Frac FreeAnim FreeBGPic FreeBrush FreeClipRegion FreeConsoleColor FreeConsoleWindow FreeDisplay FreeEventCache FreeGlyphCache FreeIcon FreeLayers FreeMem FreeMenu FreeModule FreePalette FreePath FreePointer FreeSample FreeSprite FreeTextObject FrExp FullPath GammaBrush GammaPalette GCInfo GetAllocConsoleColor GetAnimFrame GetApplicationInfo GetApplicationList GetAsset GetAttribute GetAvailableFonts GetBaudRate GetBestPen GetBrushLink GetBrushPen GetBulletColor GetCatalogString GetChannels GetCharMaps GetClipboard GetCommandLine GetConnectionIP GetConnectionPort GetConnectionProtocol GetConsoleBackground GetConsoleChr GetConsoleColor GetConsoleControlChr GetConsoleCursor GetConsoleOrigin GetConsoleSize GetConsoleStr GetConsoleStyle GetConsoleWindow GetConstant GetCoroutineStatus GetCountryInfo GetCurrentDirectory GetCurrentPoint GetDash GetDataBits GetDate GetDateNum GetDefaultAdapter GetDefaultEncoding GetDefaultLoader GetDirectoryEntry GetDisplayModes GetDTR GetEnv GetErrorName GetEventCode GetFileArgument GetFileAttributes GetFillRule GetFillStyle GetFlowControl GetFontColor GetFontStyle GetFormStyle GetFPSLimit GetFreePen GetFrontScreen GetHostName GetIconProperties GetItem GetKerningPair GetLanguageInfo GetLastError GetLayerAtPos GetLayerGroupMembers GetLayerGroups GetLayerPen GetLayerStyle GetLineCap GetLineJoin GetLineWidth GetLocaleInfo GetLocalInterfaces GetLocalIP GetLocalPort GetLocalProtocol GetMACAddress GetMemoryInfo GetMemPointer GetMemString GetMetaTable GetMiterLimit GetMonitors GetObjectData GetObjects GetObjectType GetPalettePen GetParity GetPathExtents GetPatternPosition GetPen GetPlugins GetProgramDirectory GetProgramInfo GetPubScreens GetRandomColor GetRandomFX GetRawArguments GetRealColor GetRTS GetSampleData GetSerializeMode GetShortcutPath GetSongPosition GetStartDirectory GetStopBits GetSystemCountry GetSystemInfo GetSystemLanguage GetTempFileName GetTime GetTimer GetTimestamp GetTimeZone GetType GetVersion GetVideoFrame GetVolumeInfo GetVolumeName GetWeekday Gosub Goto GrabDesktop Green GroupLayer HasItem HaveConsole HaveFreeChannel HaveItem HaveObject HaveObjectData HavePlugin HaveVolume HexStr HideConsoleCursor HideDisplay HideKeyboard HideLayer HideLayerFX HidePointer HideScreen Hypot IgnoreCase IIf ImageRequest IncreasePointer InitConsoleColor InKeyStr InsertConsoleChr InsertConsoleLine InsertConsoleStr InsertItem InsertLayer InsertSample InsertStr InstallEventHandler Int Intersection InvertAlphaChannel InvertBrush InvertMask InvertPalette IPairs IsAbsolutePath IsAlNum IsAlpha IsAnim IsAnimPlaying IsBrushEmpty IsChannelPlaying IsCntrl IsDigit IsDirectory IsFinite IsGraph IsInf IsKeyDown IsLeftMouse IsLower IsMenuItemDisabled IsMenuItemSelected IsMidMouse IsModule IsMusic IsMusicPlaying IsNan IsNil IsOnline IsPathEmpty IsPicture IsPrint IsPunct IsRightMouse IsSample IsSamplePlaying IsSound IsSpace IsTableEmpty IsUnicode IsUpper IsVideo IsVideoPlaying IsXDigit JoyAxisX JoyAxisY JoyAxisZ JoyButton JoyDir JoyFire Label JoyHat LayerExists LayerGroupExists LayerToBack LayerToFront Ld LdExp LeftMouseQuit LeftStr LegacyControl Limit Line LineTo ListItems ListRequest Ln LoadAnim LoadAnimFrame LoadBGPic LoadBrush LoadIcon LoadModule LoadPalette LoadPlugin LoadPrefs LoadSample LoadSprite Locate Log LowerStr MakeButton MakeConsoleChr MakeDate MakeDirectory MakeHostPath MatchPattern Matrix2D Max MD5 MD5Str MemToTable MergeLayers MidStr Min MixBrush MixRGB MixSample Mod ModifyAnimFrames ModifyButton ModifyKeyDown ModifyLayerFrames ModulateBrush ModulatePalette MonitorDirectory MouseX MouseY MoveAnim MoveBrush MoveConsoleWindow MoveDisplay MoveFile MoveLayer MovePointer MoveSprite MoveTextObject MoveTo Mul NearlyEqual NextDirectoryEntry NextFrame NextItem NormalizePath NPrint OilPaintBrush OpenAmigaGuide OpenAnim OpenAudio OpenCatalog OpenConnection OpenConsole OpenDirectory OpenDisplay OpenFile OpenFont OpenMusic OpenResourceMonitor OpenSerialPort OpenURL OpenVideo Pack PadNum Pairs PaletteToGray ParseDate PathItems PathPart PathRequest PathToBrush PatternFindStr PatternFindStrDirect PatternFindStrShort PatternReplaceStr PauseLayer PauseModule PauseMusic PauseTimer PauseVideo Peek PeekClipboard PenArrayToBrush PerformSelector PermissionRequest PerspectiveDistortBrush Pi PixelateBrush PlayAnim PlayAnimDisk PlayLayer PlayModule PlayMusic PlaySample PlaySubsong PlayVideo Plot Poke PolarDistortBrush PollSerialQueue Polygon PopupMenu Pow Print QuantizeBrush Rad RaiseOnError RasterizeBrush RawDiv RawEqual RawGet RawSet ReadBrushPixel ReadByte ReadBytes ReadChr ReadConsoleKey ReadConsoleStr ReadDirectory ReadFloat ReadFunction ReadInt ReadLine ReadMem ReadPen ReadPixel ReadRegistryKey ReadSerialData ReadShort ReadString ReadTable ReceiveData ReceiveUDPData Red ReduceAlphaChannel RefreshConsole RefreshDisplay RefreshLayer RelCurveTo RelLineTo RelMoveTo RemapBrush RemoveBrushPalette RemoveButton RemoveIconImage RemoveItem RemoveKeyDown RemoveLayer RemoveLayerFX RemoveLayers RemoveSprite RemoveSprites Rename RenderLayer RepeatStr ReplaceColors ReplaceStr ResetKeyStates ResetTabs ResetTimer ResolveHostName ResumeCoroutine ResumeLayer ResumeModule ResumeMusic ResumeTimer ResumeVideo ReverseFindStr ReverseStr RewindDirectory RGB RGBArrayToBrush RightStr Rnd RndF RndStrong Rol Ror RotateBrush RotateLayer RotateTextObject Round Rt Run RunCallback RunRexxScript Sar SaveAnim SaveBrush SaveIcon SavePalette SavePrefs SaveSample SaveSnapshot ScaleAnim ScaleBGPic ScaleBrush ScaleLayer ScaleSprite ScaleTextObject ScrollConsole Seek SeekLayer SeekMusic SeekVideo SelectAlphaChannel SelectAnim SelectBGPic SelectBrush SelectConsoleWindow SelectDisplay SelectLayer SelectMask SelectMenuItem SelectPalette SendApplicationMessage SendData SendMessage SendRexxCommand SendUDPData SepiaToneBrush SerializeTable SetAllocConsoleColor SetAlphaIntensity SetAnimFrameDelay SetAttribute SetBaudRate SetBorderPen SetBrushDepth SetBrushPalette SetBrushPen SetBrushTransparency SetBrushTransparentPen SetBulletColor SetBulletPen SetChannelVolume SetClipboard SetClipRegion SetConsoleBackground SetConsoleColor SetConsoleCursor SetConsoleOptions SetConsoleStyle SetConsoleTitle SetCycleTable SetDash SetDataBits SetDefaultAdapter SetDefaultEncoding SetDefaultLoader SetDepth SetDisplayAttributes SetDitherMode SetDrawPen SetDrawTagsDefault SetDTR SetEnv SetEventTimeout SetFileAttributes SetFileEncoding SetFillRule SetFillStyle SetFlowControl SetFont SetFontColor SetFontStyle SetFormStyle SetFPSLimit SetGradientPalette SetIconProperties SetInterval SetIOMode SetLayerAnchor SetLayerBorder SetLayerDepth SetLayerFilter SetLayerLight SetLayerName SetLayerPalette SetLayerPen SetLayerShadow SetLayerStyle SetLayerTint SetLayerTransparency SetLayerTransparentPen SetLayerVolume SetLayerZPos SetLineCap SetLineJoin SetLineWidth SetListItems SetMargins SetMaskMode SetMasterVolume SetMetaTable SetMiterLimit SetMusicVolume SetNetworkProtocol SetNetworkTimeout SetObjectData SetPalette SetPaletteDepth SetPaletteMode SetPalettePen SetPaletteTransparentPen SetPanning SetParity SetPen SetPitch SetPointer SetRTS SetScreenTitle SetSerializeMode SetSerializeOptions SetShadowPen SetSpriteZPos SetStandardIconImage SetStandardPalette SetStopBits SetSubtitle SetTimeout SetTimerElapse SetTitle SetTransparentPen SetTransparentThreshold SetTrayIcon SetVarType SetVectorEngine SetVideoPosition SetVideoSize SetVideoVolume SetVolume SetWBIcon Sgn SharpenBrush Shl ShowConsoleCursor ShowDisplay ShowKeyboard ShowLayer ShowLayerFX ShowNotification ShowPointer ShowRinghioMessage ShowScreen ShowToast Shr Sin Sleep SolarizeBrush SolarizePalette Sort SplitStr Sqrt StartConsoleColorMode StartPath StartSubPath StartsWith StartTimer StopAnim StopChannel StopLayer StopModule StopMusic StopSample StopTimer StopVideo StringRequest StringToFile StripStr StrLen StrStr StrToArray Sub SwapLayers SwirlBrush SystemRequest TableItems TableToMem Tan TextExtent TextHeight TextOut TextWidth TimerElapsed TimestampToDate TintBrush TintPalette ToHostName ToIP ToNumber ToString TouchConsoleWindow ToUserData TransformBox TransformBrush TransformLayer TransformPoint TransformTextObject TranslateLayer TranslatePath TrimBrush TrimStr UndefineVirtualStringFile Undo UndoFX UngroupLayer UnleftStr UnmidStr Unpack UnrightStr UnsetEnv UploadFile UpperStr Usage UseCarriageReturn UseFont UTCToDate Val ValidateDate ValidateStr Vibrate VWait Wait WaitAnimEnd WaitEvent WaitKeyDown WaitLeftMouse WaitMidMouse WaitMusicEnd WaitPatternPosition WaitRightMouse WaitSampleEnd WaitSongPosition WaitTimer WaterRippleBrush WhileKeyDown WhileMouseDown WhileMouseOn WhileRightMouseDown Wrap WriteAnimFrame WriteBrushPixel WriteByte WriteBytes WriteChr WriteFloat WriteFunction WriteInt WriteLine WriteMem WritePen WriteRegistryKey WriteSerialData WriteShort WriteString WriteTable YieldCoroutine " user-defined constants -syn match hwUserConstant "#\<\u\+\>" +syn match hwUserConstant "#\<\(\u\|_\|-\|\d\)\+\>\$\?" " user-defined functions syn match hwUserFunction "\<p_\w\{-1,}\>("me=e-1 diff --git a/runtime/syntax/java.vim b/runtime/syntax/java.vim index 51ef839..8aa053d 100644 --- a/runtime/syntax/java.vim +++ b/runtime/syntax/java.vim @@ -3,7 +3,7 @@ " Maintainer: Aliaksei Budavei <0x000c70 AT gmail DOT com> " Former Maintainer: Claudio Fleiner <claudio@fleiner.com> " Repository: https://github.com/zzzyxwvut/java-vim.git -" Last Change: 2024 Aug 22 +" Last Change: 2024 Aug 26 " Please check :help java.vim for comments on some of the options available. @@ -30,6 +30,10 @@ function! s:ff.RightConstant(x, y) abort return a:y endfunction +function! s:ff.IsRequestedPreviewFeature(n) abort + return exists("g:java_syntax_previews") && index(g:java_syntax_previews, a:n) + 1 +endfunction + if !exists("*s:ReportOnce") function s:ReportOnce(message) abort echomsg 'syntax/java.vim: ' . a:message @@ -367,9 +371,14 @@ syn match javaSpecialChar contained "\\\%(u\x\x\x\x\|[0-3]\o\o\|\o\o\=\|[bstnf syn region javaString start=+"+ end=+"+ end=+$+ contains=javaSpecialChar,javaSpecialError,@Spell syn region javaString start=+"""[ \t\x0c\r]*$+hs=e+1 end=+"""+he=s-1 contains=javaSpecialChar,javaSpecialError,javaTextBlockError,@Spell syn match javaTextBlockError +"""\s*"""+ -syn region javaStrTemplEmbExp contained matchgroup=javaStrTempl start="\\{" end="}" contains=TOP -exec 'syn region javaStrTempl start=+\%(\.[[:space:]\n]*\)\@' . s:ff.Peek('80', '') . '<="+ end=+"+ contains=javaStrTemplEmbExp,javaSpecialChar,javaSpecialError,@Spell' -exec 'syn region javaStrTempl start=+\%(\.[[:space:]\n]*\)\@' . s:ff.Peek('80', '') . '<="""[ \t\x0c\r]*$+hs=e+1 end=+"""+he=s-1 contains=javaStrTemplEmbExp,javaSpecialChar,javaSpecialError,javaTextBlockError,@Spell' + +if s:ff.IsRequestedPreviewFeature(430) + syn region javaStrTemplEmbExp contained matchgroup=javaStrTempl start="\\{" end="}" contains=TOP + exec 'syn region javaStrTempl start=+\%(\.[[:space:]\n]*\)\@' . s:ff.Peek('80', '') . '<="+ end=+"+ contains=javaStrTemplEmbExp,javaSpecialChar,javaSpecialError,@Spell' + exec 'syn region javaStrTempl start=+\%(\.[[:space:]\n]*\)\@' . s:ff.Peek('80', '') . '<="""[ \t\x0c\r]*$+hs=e+1 end=+"""+he=s-1 contains=javaStrTemplEmbExp,javaSpecialChar,javaSpecialError,javaTextBlockError,@Spell' + hi def link javaStrTempl Macro +endif + syn match javaCharacter "'[^']*'" contains=javaSpecialChar,javaSpecialCharError syn match javaCharacter "'\\''" contains=javaSpecialChar syn match javaCharacter "'[^\\]'" @@ -441,11 +450,16 @@ if exists("g:java_highlight_debug") syn match javaDebugSpecial contained "\\\%(u\x\x\x\x\|[0-3]\o\o\|\o\o\=\|[bstnfr"'\\]\)" syn region javaDebugString contained start=+"+ end=+"+ contains=javaDebugSpecial syn region javaDebugString contained start=+"""[ \t\x0c\r]*$+hs=e+1 end=+"""+he=s-1 contains=javaDebugSpecial,javaDebugTextBlockError - " The highlight groups of java{StrTempl,Debug{,Paren,StrTempl}}\, - " share one colour by default. Do not conflate unrelated parens. - syn region javaDebugStrTemplEmbExp contained matchgroup=javaDebugStrTempl start="\\{" end="}" contains=javaComment,javaLineComment,javaDebug\%(Paren\)\@!.* - exec 'syn region javaDebugStrTempl contained start=+\%(\.[[:space:]\n]*\)\@' . s:ff.Peek('80', '') . '<="+ end=+"+ contains=javaDebugStrTemplEmbExp,javaDebugSpecial' - exec 'syn region javaDebugStrTempl contained start=+\%(\.[[:space:]\n]*\)\@' . s:ff.Peek('80', '') . '<="""[ \t\x0c\r]*$+hs=e+1 end=+"""+he=s-1 contains=javaDebugStrTemplEmbExp,javaDebugSpecial,javaDebugTextBlockError' + + if s:ff.IsRequestedPreviewFeature(430) + " The highlight groups of java{StrTempl,Debug{,Paren,StrTempl}}\, + " share one colour by default. Do not conflate unrelated parens. + syn region javaDebugStrTemplEmbExp contained matchgroup=javaDebugStrTempl start="\\{" end="}" contains=javaComment,javaLineComment,javaDebug\%(Paren\)\@!.* + exec 'syn region javaDebugStrTempl contained start=+\%(\.[[:space:]\n]*\)\@' . s:ff.Peek('80', '') . '<="+ end=+"+ contains=javaDebugStrTemplEmbExp,javaDebugSpecial' + exec 'syn region javaDebugStrTempl contained start=+\%(\.[[:space:]\n]*\)\@' . s:ff.Peek('80', '') . '<="""[ \t\x0c\r]*$+hs=e+1 end=+"""+he=s-1 contains=javaDebugStrTemplEmbExp,javaDebugSpecial,javaDebugTextBlockError' + hi def link javaDebugStrTempl Macro + endif + syn match javaDebugTextBlockError contained +"""\s*"""+ syn match javaDebugCharacter contained "'[^\\]'" syn match javaDebugSpecialCharacter contained "'\\.'" @@ -471,7 +485,6 @@ if exists("g:java_highlight_debug") hi def link javaDebug Debug hi def link javaDebugString DebugString - hi def link javaDebugStrTempl Macro hi def link javaDebugTextBlockError Error hi def link javaDebugType DebugType hi def link javaDebugBoolean DebugBoolean @@ -580,7 +593,6 @@ hi def link javaSpecial Special hi def link javaSpecialError Error hi def link javaSpecialCharError Error hi def link javaString String -hi def link javaStrTempl Macro hi def link javaCharacter Character hi def link javaSpecialChar SpecialChar hi def link javaNumber Number diff --git a/runtime/syntax/sudoers.vim b/runtime/syntax/sudoers.vim index bf2d337..4cdf598 100644 --- a/runtime/syntax/sudoers.vim +++ b/runtime/syntax/sudoers.vim @@ -2,9 +2,10 @@ " Language: sudoers(5) configuration files " Maintainer: Eisuke Kawashima ( e.kawaschima+vim AT gmail.com ) " Previous Maintainer: Nikolai Weibull <now@bitwi.se> -" Latest Revision: 2021 Mar 15 +" Latest Revision: 2024 Sep 02 " Recent Changes: Support for #include and #includedir. " Added many new options (Samuel D. Leslie) +" Update allowed Tag_Spec Runas_Spec syntax items if exists("b:current_syntax") finish @@ -22,7 +23,7 @@ syn match sudoersUserSpec '^' nextgroup=@sudoersUserInSpec skipwhite syn match sudoersSpecEquals contained '=' nextgroup=@sudoersCmndSpecList skipwhite -syn cluster sudoersCmndSpecList contains=sudoersUserRunasBegin,sudoersPASSWD,@sudoersCmndInSpec +syn cluster sudoersCmndSpecList contains=sudoersUserRunasBegin,sudoersTagSpec,@sudoersCmndInSpec syn keyword sudoersTodo contained TODO FIXME XXX NOTE @@ -92,10 +93,11 @@ syn cluster sudoersUserList contains=sudoersUserListComma,sudoersUserLis syn match sudoersUserSpecComma contained ',' nextgroup=@sudoersUserInSpec skipwhite skipnl syn cluster sudoersUserSpec contains=sudoersUserSpecComma,@sudoersHostInSpec -syn match sudoersUserRunasBegin contained '(' nextgroup=@sudoersUserInRunas skipwhite skipnl +syn match sudoersUserRunasBegin contained '(' nextgroup=@sudoersUserInRunas,sudoersUserRunasColon skipwhite skipnl syn match sudoersUserRunasComma contained ',' nextgroup=@sudoersUserInRunas skipwhite skipnl -syn match sudoersUserRunasEnd contained ')' nextgroup=sudoersPASSWD,@sudoersCmndInSpec skipwhite skipnl -syn cluster sudoersUserRunas contains=sudoersUserRunasComma,@sudoersUserInRunas,sudoersUserRunasEnd +syn match sudoersUserRunasColon contained ':' nextgroup=@sudoersUserInRunas skipwhite skipnl +syn match sudoersUserRunasEnd contained ')' nextgroup=sudoersTagSpec,@sudoersCmndInSpec skipwhite skipnl +syn cluster sudoersUserRunas contains=sudoersUserRunasComma,sudoersUserRunasColon,@sudoersUserInRunas,sudoersUserRunasEnd syn match sudoersHostAliasEquals contained '=' nextgroup=@sudoersHostInList skipwhite skipnl @@ -291,7 +293,7 @@ syn region sudoersStringValue contained start=+"+ skip=+\\"+ end=+"+ nextgroup syn match sudoersListValue contained '[^[:space:],:=\\]*\%(\\[[:space:],:=\\][^[:space:],:=\\]*\)*' nextgroup=sudoersParameterListComma skipwhite skipnl syn region sudoersListValue contained start=+"+ skip=+\\"+ end=+"+ nextgroup=sudoersParameterListComma skipwhite skipnl -syn match sudoersPASSWD contained '\%(NO\)\=PASSWD:' nextgroup=@sudoersCmndInSpec skipwhite +syn match sudoersTagSpec contained '\%(NO\)\=\%(EXEC\|FOLLOW\|LOG_\%(INPUT\|OUTPUT\)\|MAIL\|INTERCEPT\|PASSWD\|SETENV\):' nextgroup=sudoersTagSpec,@sudoersCmndInSpec skipwhite hi def link sudoersSpecEquals Operator hi def link sudoersTodo Todo @@ -345,6 +347,7 @@ hi def link sudoersUserListColon Delimiter hi def link sudoersUserSpecComma Delimiter hi def link sudoersUserRunasBegin Delimiter hi def link sudoersUserRunasComma Delimiter +hi def link sudoersUserRunasColon Delimiter hi def link sudoersUserRunasEnd Delimiter hi def link sudoersHostAliasEquals Operator hi def link sudoersHostListComma Delimiter @@ -381,7 +384,7 @@ hi def link sudoersListParameterEquals Operator hi def link sudoersIntegerValue Number hi def link sudoersStringValue String hi def link sudoersListValue String -hi def link sudoersPASSWD Special +hi def link sudoersTagSpec Special hi def link sudoersInclude Statement let b:current_syntax = "sudoers" diff --git a/runtime/syntax/testdir/dumps/java_previews_430_00.dump b/runtime/syntax/testdir/dumps/java_previews_430_00.dump new file mode 100644 index 0000000..199bac0 --- /dev/null +++ b/runtime/syntax/testdir/dumps/java_previews_430_00.dump @@ -0,0 +1,20 @@ +>/+0#0000e05#ffffff0@1| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |l|e|t| |g|:|j|a|v|a|_|s|y|n|t|a|x|_|p|r|e|v|i|e|w|s| |=| |[|4|3|0|]| +0#0000000&@22 +@75 +@75 +@75 +|c+0#00e0003&|l|a|s@1| +0#0000000&|S|t|r|i|n|g|T|e|m|p|l|a|t|e|T|e|s|t|s| @2|/+0#0000e05&@1| |J|D|K| |2|1|+| |(|-@1|e|n|a|b|l|e|-|p|r|e|v|i|e|w| |-@1|r|e|l|e|a|s|e| |2|1|)|.| +0#0000000&@3 +|{| @73 +@4|s+0#00e0003&|t|a|t|i|c| +0#0000000&|{| @62 +@8|S|y|s|t|e|m|.|o|u|t|.|p|r|i|n|t|l|n|(|S|T|R|.|"@2| @40 +| +0#e000e06&@7|"| +0#0000000&@65 +| +0#e000e06&@7|\|{|"+0#e000002&|\+0#e000e06&|"|\|"|"+0#e000002&|}+0#e000e06&| +0#0000000&@57 +| +0#e000e06&@7|\|{|"+0#e000002&|\+0#e000e06&|"|\|"|"+0#e000002&|}+0#e000e06&|\|{|"+0#e000002&|\+0#e000e06&|u|0@1|5|c|\|u|0@1|2@1|"+0#e000002&|}+0#e000e06&| +0#0000000&@40 +| +0#e000e06&@7|\|{|"+0#e000002&|\+0#e000e06&|"|\|"|"+0#e000002&|}+0#e000e06&|\|{|"+0#e000002&|\+0#e000e06&|u|0@1|5|c|\|u|0@1|2@1|"+0#e000002&|}+0#e000e06&|"| +0#0000000&@39 +| +0#e000e06&@7|\|{|"+0#e000002&|\+0#e000e06&|"|\|"|"+0#e000002&|}+0#e000e06&|\|"|\|{|"+0#e000002&|\+0#e000e06&|u|0@1|5|c|\|u|0@1|2@1|\|u|0@1|5|c|\|u|0@1|2@1|"+0#e000002&|}+0#e000e06&| +0#0000000&@26 +| +0#e000e06&@7|\|{|"+0#e000002&|\+0#e000e06&|"|\|"|"+0#e000002&|}+0#e000e06&|\|"|\|{|"+0#e000002&|\+0#e000e06&|"|\|"|"+0#e000002&|}+0#e000e06&|\|{|"+0#e000002&|\+0#e000e06&|u|0@1|5|c|\|u|0@1|2@1|"+0#e000002&|}+0#e000e06&| +0#0000000&@29 +| +0#e000e06&@7|\|{|"+0#e000002&|\+0#e000e06&|"|\|"|"+0#e000002&|}+0#e000e06&|\|"|\|{|"+0#e000002&|\+0#e000e06&|"|\|"|"+0#e000002&|}+0#e000e06&|\|"@1| +0#0000000&@43 +| +0#e000e06&@7|\|{|"+0#e000002&|\+0#e000e06&|"|\|"|"+0#e000002&|}+0#e000e06&|\|"|\|{|"+0#e000002&|\+0#e000e06&|"|\|"|"+0#e000002&|}+0#e000e06&|\|"@1|\|"|"+0#0000000&@2|)|;| @36 +@75 +@8|S|t|r|i|n|g| |w|o@1|f| |=| |"+0#e000002&|W|o@1|f|"|,+0#0000000&| |d|o|g| |=| |"+0#e000002&|d|o|g|"|,+0#0000000&| |f|o|x| |=| |"+0#e000002&|f|o|x|"|;+0#0000000&| @19 +@75 +@57|1|,|1| @10|T|o|p| diff --git a/runtime/syntax/testdir/dumps/java_string_03.dump b/runtime/syntax/testdir/dumps/java_previews_430_01.dump index 9e88372..edc9697 100644 --- a/runtime/syntax/testdir/dumps/java_string_03.dump +++ b/runtime/syntax/testdir/dumps/java_previews_430_01.dump @@ -1,14 +1,14 @@ | +0#e000e06#ffffff0@7|\|{|"+0#e000002&|\+0#e000e06&|"|\|"|"+0#e000002&|}+0#e000e06&|\|"|\|{|"+0#e000002&|\+0#e000e06&|"|\|"|"+0#e000002&|}+0#e000e06&|\|{|"+0#e000002&|\+0#e000e06&|u|0@1|5|c|\|u|0@1|2@1|"+0#e000002&|}+0#e000e06&| +0#0000000&@29 | +0#e000e06&@7|\|{|"+0#e000002&|\+0#e000e06&|"|\|"|"+0#e000002&|}+0#e000e06&|\|"|\|{|"+0#e000002&|\+0#e000e06&|"|\|"|"+0#e000002&|}+0#e000e06&|\|"@1| +0#0000000&@43 -| +0#e000e06&@7|\|{|"+0#e000002&|\+0#e000e06&|"|\|"|"+0#e000002&|}+0#e000e06&|\|"|\|{|"+0#e000002&|\+0#e000e06&|"|\|"|"+0#e000002&|}+0#e000e06&|\|"@1|\|"|"+0#0000000&@2|)|;| @5|/+0#0000e05&@1| |J|D|K| |2|1|+|.| +0#0000000&@19 +| +0#e000e06&@7|\|{|"+0#e000002&|\+0#e000e06&|"|\|"|"+0#e000002&|}+0#e000e06&|\|"|\|{|"+0#e000002&|\+0#e000e06&|"|\|"|"+0#e000002&|}+0#e000e06&|\|"@1|\|"|"+0#0000000&@2|)|;| @36 @75 @8|S|t|r|i|n|g| |w|o@1|f| |=| |"+0#e000002&|W|o@1|f|"|,+0#0000000&| |d|o|g| |=| |"+0#e000002&|d|o|g|"|,+0#0000000&| |f|o|x| |=| |"+0#e000002&|f|o|x|"|;+0#0000000&| @19 > @74 -@8|S|t|r|i|n|g| |s|6| |=| |S|T|R| @51 +@8|S|t|r|i|n|g| |s|1| |=| |S|T|R| @51 @12|.|"+0#e000e06&|A| |q|u|i|c|k| |b|r|o|w|n| |\|{|f+0#0000000&|o|x|}+0#e000e06&| |j|u|m|p|s| |o|v|e|r| |t|h|e| |l|a|z|y| |\|{|d+0#0000000&|o|g|}+0#e000e06&|"|;+0#0000000&| @11 -@8|S|t|r|i|n|g| |s|7| |=| |S|T|R|.|p|r|o|c|e|s@1|(|S|t|r|i|n|g|T|e|m|p|l|a|t|e|.|R|A|W| @24 +@8|S|t|r|i|n|g| |s|2| |=| |S|T|R|.|p|r|o|c|e|s@1|(|S|t|r|i|n|g|T|e|m|p|l|a|t|e|.|R|A|W| @24 @12|.|"+0#e000e06&|\|"|\|{|w+0#0000000&|o@1|f|}+0#e000e06&|\|s|!|\|"@1|)+0#0000000&|;| @43 -@8|S|t|r|i|n|g| |s|8| |=| |S|T|R|.|"@2| @47 +@8|S|t|r|i|n|g| |s|3| |=| |S|T|R|.|"@2| @47 | +0#e000e06&@11|A|\|s|\| +0#0000000&@58 | +0#e000e06&@11|q|u|i|c|k| |\| +0#0000000&@55 | +0#e000e06&@11|b|r|o|w|n|\|s|\| +0#0000000&@54 @@ -17,4 +17,4 @@ | +0#e000e06&@11|o|v|e|r| |\| +0#0000000&@56 | +0#e000e06&@11|t|h|e|\|s|\| +0#0000000&@56 | +0#e000e06&@11|l|a|z|y| |\| +0#0000000&@56 -@57|5@1|,|0|-|1| @7|5|7|%| +@57|1|9|,|0|-|1| @7|2|6|%| diff --git a/runtime/syntax/testdir/dumps/java_string_04.dump b/runtime/syntax/testdir/dumps/java_previews_430_02.dump index 4336a92..fe1e951 100644 --- a/runtime/syntax/testdir/dumps/java_string_04.dump +++ b/runtime/syntax/testdir/dumps/java_previews_430_02.dump @@ -1,20 +1,20 @@ | +0#e000e06#ffffff0@11|l|a|z|y| |\| +0#0000000&@56 | +0#e000e06&@11|\|{|d+0#0000000&|o|g|}+0#e000e06&|"+0#0000000&@2|;| @52 -@8|S|t|r|i|n|g| |s|9| |=| |S|T|R|.|p|r|o|c|e|s@1|(|S|t|r|i|n|g|T|e|m|p|l|a|t|e|.|R|A|W| @24 +@8|S|t|r|i|n|g| |s|4| |=| |S|T|R|.|p|r|o|c|e|s@1|(|S|t|r|i|n|g|T|e|m|p|l|a|t|e|.|R|A|W| @24 @12|.| @61 @12|"@2| @59 | +0#e000e06&@11>"|\|{|w+0#0000000&|o@1|f|}+0#e000e06&|\|s|!|\|"|"+0#0000000&@2|)|;| @44 -@8|S|t|r|i|n|g| |s|1|0| |=| |j|a|v|a|.|u|t|i|l|.|F|o|r|m|a|t|P|r|o|c|e|s@1|o|r|.|F|M|T| @24 +@8|S|t|r|i|n|g| |s|5| |=| |j|a|v|a|.|u|t|i|l|.|F|o|r|m|a|t|P|r|o|c|e|s@1|o|r|.|F|M|T| @25 @12|.| |"+0#e000e06&|%|-|1|4|s|\|{|"+0#e000002&|A|\+0#e000e06&|s|"+0#e000002&| +0#0000000&|+| |S|T|R| |.| |"+0#e000e06&|q|u|i|c|k|"| +0#0000000&|+| |"+0#e000002&|b|r|o|w|n|"|}+0#e000e06&|%|s|\|{|f+0#0000000&|o|x|}+0#e000e06&| |"| +0#0000000&@10 @12|+| |j|a|v|a|.|u|t|i|l|.|F|o|r|m|a|t|P|r|o|c|e|s@1|o|r|.|F|M|T| @31 @12|.| |"+0#e000e06&|%|-|2|0|s|\|{|"+0#e000002&|j|u|m|p|s|\+0#e000e06&|s|o+0#e000002&|v|e|r| |t|h|e|\+0#e000e06&|s|"+0#e000002&| +0#0000000&@33 @20|+| |S|T|R| |.| |"+0#e000e06&|l|a|z|y|"|}|%|s|\|{|d+0#0000000&|o|g|}+0#e000e06&|"|;+0#0000000&| @29 -@8|S|t|r|i|n|g| |s|1@1| |=| |S|T|R|.|"@2| @46 +@8|S|t|r|i|n|g| |s|6| |=| |S|T|R|.|"@2| @47 | +0#e000e06&@11|\|"|\|{| +0#0000000&@11|/+0#0000e05&@1| |A| |n|e|s|t|e|d| |c|o|m@1|e|n|t|.| +0#0000000&@26 @8|(|n+0#af5f00255&|e|w| +0#0000000&|j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|F|u|n|c|t|i|o|n|<|S|t|r|i|n|g|,| |S|t|r|i|n|g|>|(|)| |{| @14 @12|p+0#00e0003&|u|b|l|i|c| +0#0000000&|S|t|r|i|n|g| |a|p@1|l|y|(|S|t|r|i|n|g| |b|a|y|)| |{| |r+0#af5f00255&|e|t|u|r|n| +0#0000000&|b|a|y|;| |}|;| @14 @8|}|)|.|a|p@1|l|y|(|w|o@1|f|)| @52 @12|}+0#e000e06&|\|s|!|\|"|"+0#0000000&@2|;| @52 -@8|S|t|r|i|n|g| |s|1|2| |=| |j|a|v|a|.|u|t|i|l|.|F|o|r|m|a|t|P|r|o|c|e|s@1|o|r|.|F|M|T| @24 +@8|S|t|r|i|n|g| |s|7| |=| |j|a|v|a|.|u|t|i|l|.|F|o|r|m|a|t|P|r|o|c|e|s@1|o|r|.|F|M|T| @25 @12|.|"@2| @58 -@57|7|3|,|4|-|1|3| @6|7|8|%| +@57|3|7|,|4|-|1|3| @6|6|3|%| diff --git a/runtime/syntax/testdir/dumps/java_string_05.dump b/runtime/syntax/testdir/dumps/java_previews_430_03.dump index 47804a9..df2afa2 100644 --- a/runtime/syntax/testdir/dumps/java_string_05.dump +++ b/runtime/syntax/testdir/dumps/java_previews_430_03.dump @@ -10,11 +10,11 @@ | +0#e000e06&@15|t|h|e|\|s|\| +0#0000000&@52 | +0#e000e06&@15|\|{| +0#0000000&|"+0#e000002&|l|a|z|y|"| +0#0000000&|}+0#e000e06&| |"+0#0000000&@2|}+0#e000e06&|\| +0#0000000&@41 | +0#e000e06&@11|%|s|\|{| +0#0000000&|d|o|g| |}+0#e000e06&|"+0#0000000&@2|;| @48 -@8|S|t|r|i|n|g| |s|1|3| |=| |S|T|R| @50 +@8|S|t|r|i|n|g| |s|8| |=| |S|T|R| @51 @12|.|"+0#e000e06&|\|"|\|{| +0#0000000&@9|/+0#0000e05&|*| |A| |n|e|s|t|e|d| |c|o|m@1|e|n|t|.| |*|/| +0#0000000&@23 @8|(@1|j|a|v|a|.|u|t|i|l|.|f|u|n|c|t|i|o|n|.|F|u|n|c|t|i|o|n|<|S|t|r|i|n|g|,| |S|t|r|i|n|g|>|)| |b|a|y| |-|>| |b|a|y|)| @8 @28|.|a|p@1|l|y|(|w|o@1|f|)| @34 @12|}+0#e000e06&|\|s|!|\|"@1|;+0#0000000&| @54 @4|}| @69 |}| @73 -@57|9|1|,|4|-|1|3| @6|B|o|t| +@57|5@1|,|4|-|1|3| @6|B|o|t| diff --git a/runtime/syntax/testdir/dumps/java_string_00.dump b/runtime/syntax/testdir/dumps/java_string_00.dump index 0d2f148..b973226 100644 --- a/runtime/syntax/testdir/dumps/java_string_00.dump +++ b/runtime/syntax/testdir/dumps/java_string_00.dump @@ -1,4 +1,4 @@ ->c+0#00e0003#ffffff0|l|a|s@1| +0#0000000&|S|t|r|i|n|g|T|e|s|t|s| @2|/+0#0000e05&@1| |J|D|K| |2|1|+| |(|-@1|e|n|a|b|l|e|-|p|r|e|v|i|e|w| |-@1|r|e|l|e|a|s|e| |2|1|)|.| +0#0000000&@11 +>c+0#00e0003#ffffff0|l|a|s@1| +0#0000000&|S|t|r|i|n|g|T|e|s|t|s| @57 |{| @73 @4|s+0#00e0003&|t|a|t|i|c| +0#0000000&|{| @62 @8|S|t|r|i|n|g| |s|1| |=| |"+0#e000002&|A| |q|u|i|c|k| |b|r|o|w|n| |f|o|x| |j|u|m|p|s| |o|v|e|r| |t|h|e| |l|a|z|y| |d|o|g|"|;+0#0000000&| @10 diff --git a/runtime/syntax/testdir/dumps/java_string_01.dump b/runtime/syntax/testdir/dumps/java_string_01.dump index 84b6494..d703561 100644 --- a/runtime/syntax/testdir/dumps/java_string_01.dump +++ b/runtime/syntax/testdir/dumps/java_string_01.dump @@ -17,4 +17,4 @@ @8|/+0#0000e05&@1| |T|h|e|r|e| |a|r|e| |S|P|A|C|E|,| |F@1|,| |H|T|,| |C|R|,| |a|n|d| |L|F| |a|f|t|e|r| |"@2|.| +0#0000000&@17 @8|S|t|r|i|n|g| |e|m|p|t|y| |=| |"@2| |^+0#0000e05&|L| +0#0000000&@2|^+0#0000e05&|M| +0#0000000&@40 | +0#e000002&@11|"+0#0000000&@2|;| @58 -@57|1|9|,|3|-|9| @7|1|5|%| +@57|1|9|,|3|-|9| @7|5|2|%| diff --git a/runtime/syntax/testdir/dumps/java_string_02.dump b/runtime/syntax/testdir/dumps/java_string_02.dump index ef6549f..e0b0ae0 100644 --- a/runtime/syntax/testdir/dumps/java_string_02.dump +++ b/runtime/syntax/testdir/dumps/java_string_02.dump @@ -9,12 +9,12 @@ | +0#e000002&@7|"@1|\+0#e000e06&|"|"+0#e000002&@1|\+0#e000e06&|u|0@1|5|c|\|u|0@1|2@1| +0#0000000&@48 | +0#e000002&@7|"@1|\+0#e000e06&|"|"+0#e000002&@1|\+0#e000e06&|"|"+0#e000002&| +0#0000000&@57 | +0#e000002&@7|"@1|\+0#e000e06&|"|"+0#e000002&@1|\+0#e000e06&|"|"+0#e000002&|\+0#e000e06&|"|"+0#0000000&@2|)|;| @50 -@75 -@8|S|y|s|t|e|m|.|o|u|t|.|p|r|i|n|t|l|n|(|S|T|R|.|"@2| @40 -| +0#e000e06&@7|"| +0#0000000&@65 -| +0#e000e06&@7|\|{|"+0#e000002&|\+0#e000e06&|"|\|"|"+0#e000002&|}+0#e000e06&| +0#0000000&@57 -| +0#e000e06&@7|\|{|"+0#e000002&|\+0#e000e06&|"|\|"|"+0#e000002&|}+0#e000e06&|\|{|"+0#e000002&|\+0#e000e06&|u|0@1|5|c|\|u|0@1|2@1|"+0#e000002&|}+0#e000e06&| +0#0000000&@40 -| +0#e000e06&@7|\|{|"+0#e000002&|\+0#e000e06&|"|\|"|"+0#e000002&|}+0#e000e06&|\|{|"+0#e000002&|\+0#e000e06&|u|0@1|5|c|\|u|0@1|2@1|"+0#e000002&|}+0#e000e06&|"| +0#0000000&@39 -| +0#e000e06&@7|\|{|"+0#e000002&|\+0#e000e06&|"|\|"|"+0#e000002&|}+0#e000e06&|\|"|\|{|"+0#e000002&|\+0#e000e06&|u|0@1|5|c|\|u|0@1|2@1|\|u|0@1|5|c|\|u|0@1|2@1|"+0#e000002&|}+0#e000e06&| +0#0000000&@26 -| +0#e000e06&@7|\|{|"+0#e000002&|\+0#e000e06&|"|\|"|"+0#e000002&|}+0#e000e06&|\|"|\|{|"+0#e000002&|\+0#e000e06&|"|\|"|"+0#e000002&|}+0#e000e06&|\|{|"+0#e000002&|\+0#e000e06&|u|0@1|5|c|\|u|0@1|2@1|"+0#e000002&|}+0#e000e06&| +0#0000000&@29 -@57|3|7|,|3|-|9| @7|3|6|%| +@4|}| @69 +|}| @73 +|~+0#4040ff13&| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +| +0#0000000&@56|3|7|,|3|-|9| @7|B|o|t| diff --git a/runtime/syntax/testdir/dumps/vim_ex_range_00.dump b/runtime/syntax/testdir/dumps/vim_ex_range_00.dump new file mode 100644 index 0000000..2b0ad77 --- /dev/null +++ b/runtime/syntax/testdir/dumps/vim_ex_range_00.dump @@ -0,0 +1,20 @@ +>"+0#0000e05#ffffff0| |E|x| |c|o|m@1|a|n|d| |r|a|n|g|e|s| +0#0000000&@55 +@75 +|'+0#e000002&|<|,+0#0000000&|'+0#e000002&|>|p+0#af5f00255&|r|i|n|t| +0#0000000&@64 +|'+0#e000002&|(|,+0#0000000&|'+0#e000002&|)|p+0#af5f00255&|r|i|n|t| +0#0000000&@64 +|'+0#e000002&|{|,+0#0000000&|'+0#e000002&|}|p+0#af5f00255&|r|i|n|t| +0#0000000&@64 +|'+0#e000002&|[|,+0#0000000&|'+0#e000002&|]|p+0#af5f00255&|r|i|n|t| +0#0000000&@64 +|~+0#4040ff13&| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +| +0#0000000&@56|1|,|1| @10|A|l@1| diff --git a/runtime/syntax/testdir/input/java_previews_430.java b/runtime/syntax/testdir/input/java_previews_430.java new file mode 100644 index 0000000..15d8ba2 --- /dev/null +++ b/runtime/syntax/testdir/input/java_previews_430.java @@ -0,0 +1,68 @@ +// VIM_TEST_SETUP let g:java_syntax_previews = [430] + + + +class StringTemplateTests // JDK 21+ (--enable-preview --release 21). +{ + static { + System.out.println(STR.""" + " + \{"\"\""} + \{"\"\""}\{"\u005c\u0022"} + \{"\"\""}\{"\u005c\u0022"}" + \{"\"\""}\"\{"\u005c\u0022\u005c\u0022"} + \{"\"\""}\"\{"\"\""}\{"\u005c\u0022"} + \{"\"\""}\"\{"\"\""}\"" + \{"\"\""}\"\{"\"\""}\""\""""); + + String woof = "Woof", dog = "dog", fox = "fox"; + + String s1 = STR + ."A quick brown \{fox} jumps over the lazy \{dog}"; + String s2 = STR.process(StringTemplate.RAW + ."\"\{woof}\s!\""); + String s3 = STR.""" + A\s\ + quick \ + brown\s\ + \{fox} \ + jumps\s\ + over \ + the\s\ + lazy \ + \{dog}"""; + String s4 = STR.process(StringTemplate.RAW + . + """ + "\{woof}\s!\""""); + String s5 = java.util.FormatProcessor.FMT + . "%-14s\{"A\s" + STR . "quick" + "brown"}%s\{fox} " + + java.util.FormatProcessor.FMT + . "%-20s\{"jumps\sover the\s" + + STR . "lazy"}%s\{dog}"; + String s6 = STR.""" + \"\{ // A nested comment. + (new java.util.function.Function<String, String>() { + public String apply(String bay) { return bay; }; + }).apply(woof) + }\s!\""""; + String s7 = java.util.FormatProcessor.FMT + .""" + %-14s\{STR.""" + A\s\ + \{ "quick" } \ + brown"""}\ + %s\{ fox } \ + %-20s\{STR.""" + jumps\s\ + over \ + the\s\ + \{ "lazy" } """}\ + %s\{ dog }"""; + String s8 = STR + ."\"\{ /* A nested comment. */ + ((java.util.function.Function<String, String>) bay -> bay) + .apply(woof) + }\s!\""; + } +} diff --git a/runtime/syntax/testdir/input/java_string.java b/runtime/syntax/testdir/input/java_string.java index 43a7a05..51c30b9 100644 --- a/runtime/syntax/testdir/input/java_string.java +++ b/runtime/syntax/testdir/input/java_string.java @@ -1,4 +1,4 @@ -class StringTests // JDK 21+ (--enable-preview --release 21). +class StringTests { static { String s1 = "A quick brown fox jumps over the lazy dog"; @@ -40,65 +40,5 @@ class StringTests // JDK 21+ (--enable-preview --release 21). ""\"""\u005c\u0022 ""\"""\"" ""\"""\""\""""); - - System.out.println(STR.""" - " - \{"\"\""} - \{"\"\""}\{"\u005c\u0022"} - \{"\"\""}\{"\u005c\u0022"}" - \{"\"\""}\"\{"\u005c\u0022\u005c\u0022"} - \{"\"\""}\"\{"\"\""}\{"\u005c\u0022"} - \{"\"\""}\"\{"\"\""}\"" - \{"\"\""}\"\{"\"\""}\""\""""); // JDK 21+. - - String woof = "Woof", dog = "dog", fox = "fox"; - - String s6 = STR - ."A quick brown \{fox} jumps over the lazy \{dog}"; - String s7 = STR.process(StringTemplate.RAW - ."\"\{woof}\s!\""); - String s8 = STR.""" - A\s\ - quick \ - brown\s\ - \{fox} \ - jumps\s\ - over \ - the\s\ - lazy \ - \{dog}"""; - String s9 = STR.process(StringTemplate.RAW - . - """ - "\{woof}\s!\""""); - String s10 = java.util.FormatProcessor.FMT - . "%-14s\{"A\s" + STR . "quick" + "brown"}%s\{fox} " - + java.util.FormatProcessor.FMT - . "%-20s\{"jumps\sover the\s" - + STR . "lazy"}%s\{dog}"; - String s11 = STR.""" - \"\{ // A nested comment. - (new java.util.function.Function<String, String>() { - public String apply(String bay) { return bay; }; - }).apply(woof) - }\s!\""""; - String s12 = java.util.FormatProcessor.FMT - .""" - %-14s\{STR.""" - A\s\ - \{ "quick" } \ - brown"""}\ - %s\{ fox } \ - %-20s\{STR.""" - jumps\s\ - over \ - the\s\ - \{ "lazy" } """}\ - %s\{ dog }"""; - String s13 = STR - ."\"\{ /* A nested comment. */ - ((java.util.function.Function<String, String>) bay -> bay) - .apply(woof) - }\s!\""; } } diff --git a/runtime/syntax/testdir/input/vim_ex_range.vim b/runtime/syntax/testdir/input/vim_ex_range.vim new file mode 100644 index 0000000..3383702 --- /dev/null +++ b/runtime/syntax/testdir/input/vim_ex_range.vim @@ -0,0 +1,6 @@ +" Ex command ranges + +'<,'>print +'(,')print +'{,'}print +'[,']print diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index 2fa2e35..e290a70 100644 --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -3,7 +3,7 @@ " Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com> " Doug Kearns <dougkearns@gmail.com> " URL: https://github.com/vim-jp/syntax-vim-ex -" Last Change: 2024 Aug 23 +" Last Change: 2024 Aug 30 " Former Maintainer: Charles E. Campbell " DO NOT CHANGE DIRECTLY. @@ -517,8 +517,8 @@ syn match vimString "[^(,]'[^']\{-}\zs'" " Marks, Registers, Addresses, Filters: {{{2 syn match vimMark "'[a-zA-Z0-9]\ze[-+,!]" nextgroup=vimFilter,vimMarkNumber,vimSubst1 -syn match vimMark "'[<>]\ze[-+,!]" nextgroup=vimFilter,vimMarkNumber,vimSubst1 -syn match vimMark ",\zs'[<>]\ze" nextgroup=vimFilter,vimMarkNumber,vimSubst1 +syn match vimMark "'[[\]{}()<>]\ze[-+,!]" nextgroup=vimFilter,vimMarkNumber,vimSubst1 +syn match vimMark ",\zs'[[\]{}()<>]\ze" nextgroup=vimFilter,vimMarkNumber,vimSubst1 syn match vimMark "[!,:]\zs'[a-zA-Z0-9]" nextgroup=vimFilter,vimMarkNumber,vimSubst1 syn match vimMark "\<norm\%[al]\s\zs'[a-zA-Z0-9]" nextgroup=vimFilter,vimMarkNumber,vimSubst1 syn match vimMarkNumber "[-+]\d\+" contained contains=vimOper nextgroup=vimSubst1 diff --git a/src/Makefile b/src/Makefile index 257742f..0b4a453 100644 --- a/src/Makefile +++ b/src/Makefile @@ -2939,6 +2939,7 @@ shadow: runtime pixmaps ../../testdir/*.py \ ../../testdir/python* \ ../../testdir/pyxfile \ + ../../testdir/ru_RU \ ../../testdir/sautest \ ../../testdir/samples \ ../../testdir/dumps \ diff --git a/src/charset.c b/src/charset.c index 19b0895..399f258 100644 --- a/src/charset.c +++ b/src/charset.c @@ -1678,6 +1678,9 @@ getvcol( } clear_chartabsize_arg(&cts); + if (*ptr == NUL && pos->col < MAXCOL && pos->col > ptr - line) + pos->col = ptr - line; + if (start != NULL) *start = vcol + head; if (end != NULL) diff --git a/src/drawscreen.c b/src/drawscreen.c index 9096c28..1802ade 100644 --- a/src/drawscreen.c +++ b/src/drawscreen.c @@ -2774,7 +2774,7 @@ win_update(win_T *wp) redrawWinline(wp, wp->w_cursor.lnum); } #endif - // New redraw either due to updated topline or due to wcol fix. + // New redraw either due to updated topline, wcol fix or reset skipcol. if (wp->w_redr_type != 0) { // Don't update for changes in buffer again. @@ -2782,6 +2782,7 @@ win_update(win_T *wp) curbuf->b_mod_set = FALSE; j = curbuf->b_mod_xlines; curbuf->b_mod_xlines = 0; + curs_columns(TRUE); win_update(curwin); curbuf->b_mod_set = i; curbuf->b_mod_xlines = j; @@ -512,6 +512,7 @@ edit( #ifdef FEAT_DIFF && curwin->w_topfill == old_topfill #endif + && count <= 1 ) { mincol = curwin->w_wcol; @@ -549,11 +550,13 @@ edit( } // May need to adjust w_topline to show the cursor. - update_topline(); + if (count <= 1) + update_topline(); did_backspace = FALSE; - validate_cursor(); // may set must_redraw + if (count <= 1) + validate_cursor(); // may set must_redraw /* * Redraw the display when no characters are waiting. @@ -566,7 +569,8 @@ edit( if (curwin->w_p_crb) do_check_cursorbind(); - update_curswant(); + if (count <= 1) + update_curswant(); old_topline = curwin->w_topline; #ifdef FEAT_DIFF old_topfill = curwin->w_topfill; diff --git a/src/fileio.c b/src/fileio.c index d27a172..5fee4e0 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -5714,6 +5714,8 @@ file_pat_to_reg_pat( ) *allow_dirs = TRUE; reg_pat[i++] = '\\'; + if (enc_dbcs != 0 && (*mb_ptr2len)(p) > 1) + reg_pat[i++] = *p++; reg_pat[i++] = *p; } break; diff --git a/src/highlight.c b/src/highlight.c index d3ea2d2..0928952 100644 --- a/src/highlight.c +++ b/src/highlight.c @@ -1215,8 +1215,8 @@ highlight_set_cterm_color( target.key = 0; target.value = (char *)arg; - target.length = 0; // not used, see cmp_keyvalue_value_i() - entry = (keyvalue_T *)bsearch(&target, &color_name_tab, ARRAY_LENGTH(color_name_tab), sizeof(color_name_tab[0]), cmp_keyvalue_value_i); + target.length = 0; // not used, see cmp_keyvalue_value_ni() + entry = (keyvalue_T *)bsearch(&target, &color_name_tab, ARRAY_LENGTH(color_name_tab), sizeof(color_name_tab[0]), cmp_keyvalue_value_ni); if (entry == NULL) { semsg(_(e_color_name_or_number_not_recognized_str), key_start); @@ -2542,8 +2542,8 @@ gui_get_color_cmn(char_u *name) target.key = 0; target.value = (char *)name; - target.length = 0; // not used, see cmp_keyvalue_value_i() - entry = (keyvalue_T *)bsearch(&target, &rgb_tab, ARRAY_LENGTH(rgb_tab), sizeof(rgb_tab[0]), cmp_keyvalue_value_i); + target.length = 0; // not used, see cmp_keyvalue_value_ni() + entry = (keyvalue_T *)bsearch(&target, &rgb_tab, ARRAY_LENGTH(rgb_tab), sizeof(rgb_tab[0]), cmp_keyvalue_value_ni); if (entry != NULL) return gui_adjust_rgb((guicolor_T)entry->key); diff --git a/src/insexpand.c b/src/insexpand.c index af818d4..d424fff 100644 --- a/src/insexpand.c +++ b/src/insexpand.c @@ -3546,7 +3546,8 @@ static int compare_scores(const void *a, const void *b) int idx_b = *(const int *)b; int score_a = compl_fuzzy_scores[idx_a]; int score_b = compl_fuzzy_scores[idx_b]; - return (score_a > score_b) ? -1 : (score_a < score_b) ? 1 : 0; + return score_a == score_b ? (idx_a == idx_b ? 0 : (idx_a < idx_b ? -1 : 1)) + : (score_a > score_b ? -1 : 1); } /* diff --git a/src/misc2.c b/src/misc2.c index b5044fb..5a8f369 100644 --- a/src/misc2.c +++ b/src/misc2.c @@ -3090,17 +3090,7 @@ cmp_keyvalue_value_n(const void *a, const void *b) return STRNCMP(kv1->value, kv2->value, MAX(kv1->length, kv2->length)); } -// compare two keyvalue_T structs by case insensitive value - int -cmp_keyvalue_value_i(const void *a, const void *b) -{ - keyvalue_T *kv1 = (keyvalue_T *)a; - keyvalue_T *kv2 = (keyvalue_T *)b; - - return STRICMP(kv1->value, kv2->value); -} - -// compare two keyvalue_T structs by case insensitive value +// compare two keyvalue_T structs by case insensitive ASCII value // with length int cmp_keyvalue_value_ni(const void *a, const void *b) @@ -3108,6 +3098,6 @@ cmp_keyvalue_value_ni(const void *a, const void *b) keyvalue_T *kv1 = (keyvalue_T *)a; keyvalue_T *kv2 = (keyvalue_T *)b; - return STRNICMP(kv1->value, kv2->value, MAX(kv1->length, kv2->length)); + return vim_strnicmp_asc(kv1->value, kv2->value, MAX(kv1->length, kv2->length)); } diff --git a/src/normal.c b/src/normal.c index a929dd8..b054005 100644 --- a/src/normal.c +++ b/src/normal.c @@ -6227,6 +6227,7 @@ nv_g_cmd(cmdarg_T *cap) #ifdef FEAT_BYTEOFF // "go": goto byte count from start of buffer case 'o': + oap->inclusive = FALSE; goto_byte(cap->count0); break; #endif diff --git a/src/proto/misc2.pro b/src/proto/misc2.pro index 7a5b367..dbcfc08 100644 --- a/src/proto/misc2.pro +++ b/src/proto/misc2.pro @@ -63,6 +63,5 @@ int build_argv_from_list(list_T *l, char ***argv, int *argc); int get_special_pty_type(void); int cmp_keyvalue_value(const void *a, const void *b); int cmp_keyvalue_value_n(const void *a, const void *b); -int cmp_keyvalue_value_i(const void *a, const void *b); int cmp_keyvalue_value_ni(const void *a, const void *b); /* vim: set ft=c : */ diff --git a/src/proto/strings.pro b/src/proto/strings.pro index aa8b374..b792edc 100644 --- a/src/proto/strings.pro +++ b/src/proto/strings.pro @@ -15,6 +15,7 @@ void vim_strcat(char_u *to, char_u *from, size_t tosize); size_t vim_strlen_maxlen(char *s, size_t maxlen); int vim_stricmp(char *s1, char *s2); int vim_strnicmp(char *s1, char *s2, size_t len); +int vim_strnicmp_asc(char *s1, char *s2, size_t len); char_u *vim_strchr(char_u *string, int c); char_u *vim_strbyte(char_u *string, int c); char_u *vim_strrchr(char_u *string, int c); diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c index 6db4134..557d0e1 100644 --- a/src/regexp_nfa.c +++ b/src/regexp_nfa.c @@ -6525,7 +6525,8 @@ nfa_regmatch( else result = FAIL; - if (t->state->out->out1->c == NFA_END_COMPOSING) + if (t->state->out->out1 != NULL + && t->state->out->out1->c == NFA_END_COMPOSING) { end = t->state->out->out1; ADD_STATE_IF_MATCH(end); diff --git a/src/search.c b/src/search.c index e5936d8..a7fd44e 100644 --- a/src/search.c +++ b/src/search.c @@ -5217,7 +5217,7 @@ search_for_fuzzy_match( { pos_T current_pos = *pos; pos_T circly_end; - int found_new_match = FAIL; + int found_new_match = FALSE; int looped_around = FALSE; if (whole_line) diff --git a/src/strings.c b/src/strings.c index b8ea00b..a586d8a 100644 --- a/src/strings.c +++ b/src/strings.c @@ -590,6 +590,33 @@ vim_strnicmp(char *s1, char *s2, size_t len) #endif /* + * Compare two ASCII strings, for length "len", ignoring case, ignoring locale + * (mostly matters for turkish locale where i I might be different). + * return 0 for match, < 0 for smaller, > 0 for bigger + */ + int +vim_strnicmp_asc(char *s1, char *s2, size_t len) +{ + int i; + int save_cmp_flags = cmp_flags; + + cmp_flags |= CMP_KEEPASCII; // compare by ASCII value, ignoring locale + while (len > 0) + { + i = vim_tolower(*s1) - vim_tolower(*s2); + if (i != 0) + break; // this character is different + if (*s1 == NUL) + break; // strings match until NUL + ++s1; + ++s2; + --len; + } + cmp_flags = save_cmp_flags; + return i; +} + +/* * Search for first occurrence of "c" in "string". * Version of strchr() that handles unsigned char strings with characters from * 128 to 255 correctly. It also doesn't return a pointer to the NUL at the diff --git a/src/testdir/crash/heap_overflow_glob2regpat b/src/testdir/crash/heap_overflow_glob2regpat Binary files differnew file mode 100644 index 0000000..8baf6f3 --- /dev/null +++ b/src/testdir/crash/heap_overflow_glob2regpat diff --git a/src/testdir/crash/nullptr_regexp_nfa b/src/testdir/crash/nullptr_regexp_nfa Binary files differnew file mode 100644 index 0000000..6b2edc6 --- /dev/null +++ b/src/testdir/crash/nullptr_regexp_nfa diff --git a/src/testdir/dumps/Test_pum_highlights_15.dump b/src/testdir/dumps/Test_pum_highlights_15.dump index e923b43..199f753 100644 --- a/src/testdir/dumps/Test_pum_highlights_15.dump +++ b/src/testdir/dumps/Test_pum_highlights_15.dump @@ -1,4 +1,4 @@ -|/+0&#ffffff0|n|o|n|_|e|x|i|t|_|f|o|l|d|e|r> @58 +|/+0&#ffffff0|n|o|n|_|e|x|i|s|t|i|n|g|_|f|o|l|d|e|r> @54 |~+0#4040ff13&| @73 |~| @73 |~| @73 diff --git a/src/testdir/dumps/Test_smooth_long_scrolloff_1.dump b/src/testdir/dumps/Test_smooth_long_scrolloff_1.dump index 6c1d223..f6ca843 100644 --- a/src/testdir/dumps/Test_smooth_long_scrolloff_1.dump +++ b/src/testdir/dumps/Test_smooth_long_scrolloff_1.dump @@ -1,8 +1,8 @@ -| +0&#ffffff0@39 -@40 -@40 -> @39 -@40 -@40 -@40 -@40 +|<+0#4040ff13#ffffff0@2|t+0#0000000&|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t +|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l +|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| +>t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| +|l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g +| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o +| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n +| @39 diff --git a/src/testdir/dumps/Test_smooth_long_scrolloff_7.dump b/src/testdir/dumps/Test_smooth_long_scrolloff_7.dump index c21c022..6d7e157 100644 --- a/src/testdir/dumps/Test_smooth_long_scrolloff_7.dump +++ b/src/testdir/dumps/Test_smooth_long_scrolloff_7.dump @@ -1,8 +1,8 @@ -| +0&#ffffff0@39 -@40 -@40 -@40 -@40 -@40 -> @39 +|<+0#4040ff13#ffffff0@2|l+0#0000000&|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l +|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| +|t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| +|l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g +| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o +| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n +>g| |t|w|o| |l|o|n|g| |t|w|o| |l|o|n|g| @20 @40 diff --git a/src/testdir/test_autocmd.vim b/src/testdir/test_autocmd.vim index 5a91351..a863a23 100644 --- a/src/testdir/test_autocmd.vim +++ b/src/testdir/test_autocmd.vim @@ -4863,5 +4863,24 @@ func Test_WinNewPre_crash() let &cmdheight=_cmdheight endfunc +" The specifics of the turkish locale may +" cause that Vim will not treat the GuiEnter autocommand +" as case insensitive and instead issues an error +func Test_GuiEnter_Turkish_locale() + try + let lng = v:lang + lang tr_TR.UTF-8 + let result = execute(':au GuiEnter') + call assert_equal("\n--- Autocommands ---", result) + let result = execute(':au GUIENTER') + call assert_equal("\n--- Autocommands ---", result) + let result = execute(':au guienter') + call assert_equal("\n--- Autocommands ---", result) + exe ":lang" lng + catch /E197:/ + " can't use Turkish locale + throw 'Skipped: Turkish locale not available' + endtry +endfunc " vim: shiftwidth=2 sts=2 expandtab diff --git a/src/testdir/test_crash.vim b/src/testdir/test_crash.vim index b334876..bfd04ff 100644 --- a/src/testdir/test_crash.vim +++ b/src/testdir/test_crash.vim @@ -222,6 +222,17 @@ func Test_crash1_3() call term_sendkeys(buf, args) call TermWait(buf, 150) + let file = 'crash/heap_overflow_glob2regpat' + let cmn_args = "%s -u NONE -i NONE -n -X -m -n -e -s -S %s -c ':qa!'" + let args = printf(cmn_args, vim, file) + call term_sendkeys(buf, args) + call TermWait(buf, 50) + + let file = 'crash/nullptr_regexp_nfa' + let cmn_args = "%s -u NONE -i NONE -n -X -m -n -e -s -S %s -c ':qa!'" + let args = printf(cmn_args, vim, file) + call term_sendkeys(buf, args) + call TermWait(buf, 50) " clean up exe buf .. "bw!" diff --git a/src/testdir/test_normal.vim b/src/testdir/test_normal.vim index 398bf29..adb5ce7 100644 --- a/src/testdir/test_normal.vim +++ b/src/testdir/test_normal.vim @@ -4281,4 +4281,17 @@ func Test_scroll_longline_no_loop() exe "normal! \<C-E>" bwipe! endfunc + +" Test for go command +func Test_normal_go() + new + call setline(1, ['one two three four']) + call cursor(1, 5) + norm! dvgo + call assert_equal('wo three four', getline(1)) + norm! ... + call assert_equal('three four', getline(1)) + + bwipe! +endfunc " vim: shiftwidth=2 sts=2 expandtab nofoldenable diff --git a/src/testdir/test_popup.vim b/src/testdir/test_popup.vim index fe958da..caec8ff 100644 --- a/src/testdir/test_popup.vim +++ b/src/testdir/test_popup.vim @@ -1494,7 +1494,7 @@ func Test_pum_highlights_match() call VerifyScreenDump(buf, 'Test_pum_highlights_11', {}) " issue #15357 - call term_sendkeys(buf, "\<ESC>S/non_exit_folder\<C-X>\<C-F>") + call term_sendkeys(buf, "\<ESC>S/non_existing_folder\<C-X>\<C-F>") call TermWait(buf, 50) call VerifyScreenDump(buf, 'Test_pum_highlights_15', {}) diff --git a/src/testdir/test_scroll_opt.vim b/src/testdir/test_scroll_opt.vim index 1b60019..47a3cf8 100644 --- a/src/testdir/test_scroll_opt.vim +++ b/src/testdir/test_scroll_opt.vim @@ -1162,7 +1162,6 @@ func Test_smooth_long_scrolloff() END call writefile(lines, 'XSmoothLongScrolloff', 'D') let buf = RunVimInTerminal('-u NONE -S XSmoothLongScrolloff', #{rows: 8, cols: 40}) - "FIXME: empty screen due to reset_skipcol()/curs_columns() shenanigans call term_sendkeys(buf, ":norm j721|\<CR>") call VerifyScreenDump(buf, 'Test_smooth_long_scrolloff_1', {}) @@ -1182,7 +1181,6 @@ func Test_smooth_long_scrolloff() call VerifyScreenDump(buf, 'Test_smooth_long_scrolloff_6', {}) call term_sendkeys(buf, "gk") - "FIXME: empty screen due to reset_skipcol()/curs_columns() shenanigans call VerifyScreenDump(buf, 'Test_smooth_long_scrolloff_7', {}) call StopVimInTerminal(buf) diff --git a/src/version.c b/src/version.c index 314a320..2c9ae2c 100644 --- a/src/version.c +++ b/src/version.c @@ -705,6 +705,28 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 709, +/**/ + 708, +/**/ + 707, +/**/ + 706, +/**/ + 705, +/**/ + 704, +/**/ + 703, +/**/ + 702, +/**/ + 701, +/**/ + 700, +/**/ + 699, +/**/ 698, /**/ 697, |