From e7f6c520141c104960790d9bb2e52260ba959b76 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Tue, 27 Apr 2021 20:26:22 -0400 Subject: [PATCH] vim-patch:b17893aa940d Update runtime files https://github.com/vim/vim/commit/b17893aa940dc7d45421f875f5d90855880aad27 Omit feedkeys() changes. --- runtime/doc/eval.txt | 31 ++++++++++++++++++------- runtime/doc/options.txt | 4 ++-- runtime/ftplugin/yaml.vim | 9 +++++-- runtime/indent/php.vim | 2 +- runtime/syntax/help.vim | 4 ++-- runtime/syntax/make.vim | 49 +++++++++++++++++++++++++-------------- runtime/syntax/vim.vim | 4 ++-- 7 files changed, 67 insertions(+), 36 deletions(-) diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index f6ca0d5242..8558493520 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -5024,6 +5024,16 @@ has({feature}) Returns 1 if {feature} is supported, 0 otherwise. The {feature} argument is a feature name like "nvim-0.2.1" or "win32", see below. See also |exists()|. + If the code has a syntax error, then Nvim may skip the rest + of the line and miss |:endif|. > + if has('feature') | let x = this->breaks->without->the->feature | endif +< + Put |:if| and |:endif| on separate lines to avoid the + syntax error. > + if has('feature') + let x = this->breaks->without->the->feature + endif +< Vim's compile-time feature-names (prefixed with "+") are not recognized because Nvim is always compiled with all possible features. |feature-compile| @@ -7584,7 +7594,12 @@ setpos({expr}, {list}) setqflist({list} [, {action}[, {what}]]) *setqflist()* Create or replace or add to the quickfix list. - When {what} is not present, use the items in {list}. Each + If the optional {what} dictionary argument is supplied, then + only the items listed in {what} are set. The first {list} + argument is ignored. See below for the supported items in + {what}. + + When {what} is not present, the items in {list} are used. Each item must be a dictionary. Non-dictionary items in {list} are ignored. Each dictionary item can contain the following entries: @@ -7639,10 +7654,7 @@ setqflist({list} [, {action}[, {what}]]) *setqflist()* freed. To add a new quickfix list at the end of the stack, set "nr" in {what} to "$". - If the optional {what} dictionary argument is supplied, then - only the items listed in {what} are set. The first {list} - argument is ignored. The following items can be specified in - {what}: + The following items can be specified in dictionary {what}: context quickfix list context. See |quickfix-context| efm errorformat to use when parsing text from "lines". If this is not present, then the @@ -9177,11 +9189,12 @@ winlayout([{tabnr}]) *winlayout()* " Two horizontally split windows :echo winlayout() ['col', [['leaf', 1000], ['leaf', 1001]]] - " Three horizontally split windows, with two - " vertically split windows in the middle window + " The second tab page, with three horizontally split + " windows, with two vertically split windows in the + " middle window :echo winlayout(2) - ['col', [['leaf', 1002], ['row', ['leaf', 1003], - ['leaf', 1001]]], ['leaf', 1000]] + ['col', [['leaf', 1002], ['row', [['leaf', 1003], + ['leaf', 1001]]], ['leaf', 1000]]] < *winline()* winline() The result is a Number, which is the screen line of the cursor diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 569fccc903..5ee32a32b0 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -3530,8 +3530,8 @@ A jump table for the options with a short description can be found at |Q_op|. be able to execute Normal mode commands. This is the opposite of the 'keymap' option, where characters are mapped in Insert mode. - Also consider resetting 'langremap' to avoid 'langmap' applies to - characters resulting from a mapping. + Also consider setting 'langremap' to off, to prevent 'langmap' from + applying to characters resulting from a mapping. This option cannot be set from a |modeline| or in the |sandbox|, for security reasons. diff --git a/runtime/ftplugin/yaml.vim b/runtime/ftplugin/yaml.vim index ceff36f7e4..db7cbd7ddb 100644 --- a/runtime/ftplugin/yaml.vim +++ b/runtime/ftplugin/yaml.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: YAML (YAML Ain't Markup Language) -" Previous Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Previous Maintainer: Nikolai Weibull (inactive) +" Last Change: 2020 Mar 02 if exists("b:did_ftplugin") finish @@ -16,5 +16,10 @@ let b:undo_ftplugin = "setl com< cms< et< fo<" setlocal comments=:# commentstring=#\ %s expandtab setlocal formatoptions-=t formatoptions+=croql +if !exists("g:yaml_recommended_style") || g:yaml_recommended_style != 0 + let b:undo_ftplugin ..= " sw< sts<" + setlocal shiftwidth=2 softtabstop=2 +endif + let &cpo = s:cpo_save unlet s:cpo_save diff --git a/runtime/indent/php.vim b/runtime/indent/php.vim index 67a1327dc9..0e623689d5 100644 --- a/runtime/indent/php.vim +++ b/runtime/indent/php.vim @@ -3,7 +3,7 @@ " Author: John Wellesz " URL: https://www.2072productions.com/vim/indent/php.vim " Home: https://github.com/2072/PHP-Indenting-for-VIm -" Last Change: 2019 Jully 21st +" Last Change: 2020 Mar 05 " Version: 1.70 " " diff --git a/runtime/syntax/help.vim b/runtime/syntax/help.vim index c970278742..a387dd4342 100644 --- a/runtime/syntax/help.vim +++ b/runtime/syntax/help.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: Vim help file " Maintainer: Bram Moolenaar (Bram@vim.org) -" Last Change: 2019 Nov 26 +" Last Change: 2020 Mar 06 " Quit when a (custom) syntax file was already loaded if exists("b:current_syntax") @@ -11,7 +11,7 @@ endif let s:cpo_save = &cpo set cpo&vim -syn match helpHeadline "^[-A-Z .][-A-Z0-9 .()_]*[ \t]\+\*"me=e-1 +syn match helpHeadline "^[-A-Z .][-A-Z0-9 .()_]*\ze\(\s\+\*\|$\)" syn match helpSectionDelim "^===.*===$" syn match helpSectionDelim "^---.*--$" if has("conceal") diff --git a/runtime/syntax/make.vim b/runtime/syntax/make.vim index 0e057d2eb8..2a64dcd85c 100644 --- a/runtime/syntax/make.vim +++ b/runtime/syntax/make.vim @@ -3,7 +3,7 @@ " Maintainer: Roland Hieber , " Previous Maintainer: Claudio Fleiner " URL: https://github.com/vim/vim/blob/master/runtime/syntax/make.vim -" Last Change: 2020 Jan 15 +" Last Change: 2020 Mar 04 " quit when a syntax file was already loaded if exists("b:current_syntax") @@ -13,22 +13,13 @@ endif let s:cpo_save = &cpo set cpo&vim - " some special characters syn match makeSpecial "^\s*[@+-]\+" syn match makeNextLine "\\\n\s*" -" some directives -syn match makePreCondit "^ *\(ifn\=\(eq\|def\)\>\|else\(\s\+ifn\=\(eq\|def\)\)\=\>\|endif\>\)" -syn match makeInclude "^ *[-s]\=include\s.*$" -syn match makeStatement "^ *vpath" -syn match makeExport "^ *\(export\|unexport\)\>" -syn match makeOverride "^ *override" -hi link makeOverride makeStatement -hi link makeExport makeStatement - " catch unmatched define/endef keywords. endef only matches it is by itself on a line, possibly followed by a commend -syn region makeDefine start="^\s*define\s" end="^\s*endef\s*\(#.*\)\?$" contains=makeStatement,makeIdent,makePreCondit,makeDefine +syn region makeDefine start="^\s*define\s" end="^\s*endef\s*\(#.*\)\?$" + \ contains=makeStatement,makeIdent,makePreCondit,makeDefine " Microsoft Makefile specials syn case ignore @@ -53,17 +44,36 @@ syn match makeConfig "@[A-Za-z0-9_]\+@" syn match makeImplicit "^\.[A-Za-z0-9_./\t -]\+\s*:$"me=e-1 syn match makeImplicit "^\.[A-Za-z0-9_./\t -]\+\s*:[^=]"me=e-2 -syn region makeTarget transparent matchgroup=makeTarget start="^[~A-Za-z0-9_./$()%-][A-Za-z0-9_./\t $()%-]*:\{1,2}[^:=]"rs=e-1 end=";"re=e-1,me=e-1 end="[^\\]$" keepend contains=makeIdent,makeSpecTarget,makeNextLine,makeComment,makeDString skipnl nextGroup=makeCommands -syn match makeTarget "^[~A-Za-z0-9_./$()%*@-][A-Za-z0-9_./\t $()%*@-]*::\=\s*$" contains=makeIdent,makeSpecTarget,makeComment skipnl nextgroup=makeCommands,makeCommandError +syn region makeTarget transparent matchgroup=makeTarget + \ start="^[~A-Za-z0-9_./$()%-][A-Za-z0-9_./\t $()%-]*:\{1,2}[^:=]"rs=e-1 + \ end=";"re=e-1,me=e-1 end="[^\\]$" + \ keepend contains=makeIdent,makeSpecTarget,makeNextLine,makeComment,makeDString + \ skipnl nextGroup=makeCommands +syn match makeTarget "^[~A-Za-z0-9_./$()%*@-][A-Za-z0-9_./\t $()%*@-]*::\=\s*$" + \ contains=makeIdent,makeSpecTarget,makeComment + \ skipnl nextgroup=makeCommands,makeCommandError -syn region makeSpecTarget transparent matchgroup=makeSpecTarget start="^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\)\>\s*:\{1,2}[^:=]"rs=e-1 end="[^\\]$" keepend contains=makeIdent,makeSpecTarget,makeNextLine,makeComment skipnl nextGroup=makeCommands -syn match makeSpecTarget "^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\)\>\s*::\=\s*$" contains=makeIdent,makeComment skipnl nextgroup=makeCommands,makeCommandError +syn region makeSpecTarget transparent matchgroup=makeSpecTarget + \ start="^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\)\>\s*:\{1,2}[^:=]"rs=e-1 + \ end="[^\\]$" keepend + \ contains=makeIdent,makeSpecTarget,makeNextLine,makeComment skipnl nextGroup=makeCommands +syn match makeSpecTarget "^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\)\>\s*::\=\s*$" + \ contains=makeIdent,makeComment + \ skipnl nextgroup=makeCommands,makeCommandError syn match makeCommandError "^\s\+\S.*" contained -syn region makeCommands start=";"hs=s+1 start="^\t" end="^[^\t#]"me=e-1,re=e-1 end="^$" contained contains=makeCmdNextLine,makeSpecial,makeComment,makeIdent,makePreCondit,makeDefine,makeDString,makeSString nextgroup=makeCommandError +syn region makeCommands contained start=";"hs=s+1 start="^\t" + \ end="^[^\t#]"me=e-1,re=e-1 end="^$" + \ contains=makeCmdNextLine,makeSpecial,makeComment,makeIdent,makePreCondit,makeDefine,makeDString,makeSString + \ nextgroup=makeCommandError syn match makeCmdNextLine "\\\n."he=e-1 contained - +" some directives +syn match makePreCondit "^ *\(ifn\=\(eq\|def\)\>\|else\(\s\+ifn\=\(eq\|def\)\)\=\>\|endif\>\)" +syn match makeInclude "^ *[-s]\=include\s.*$" +syn match makeStatement "^ *vpath" +syn match makeExport "^ *\(export\|unexport\)\>" +syn match makeOverride "^ *override" " Statements / Functions (GNU make) syn match makeStatement contained "(\(abspath\|addprefix\|addsuffix\|and\|basename\|call\|dir\|error\|eval\|file\|filter-out\|filter\|findstring\|firstword\|flavor\|foreach\|guile\|if\|info\|join\|lastword\|notdir\|or\|origin\|patsubst\|realpath\|shell\|sort\|strip\|subst\|suffix\|value\|warning\|wildcard\|word\|wordlist\|words\)\>"ms=s+1 @@ -103,6 +113,9 @@ syn sync match makeCommandSync groupthere makeCommands "^[A-Za-z0-9_./$()%-][A-Z hi def link makeNextLine makeSpecial hi def link makeCmdNextLine makeSpecial +hi link makeOverride makeStatement +hi link makeExport makeStatement + hi def link makeSpecTarget Statement if !exists("make_no_commands") hi def link makeCommands Number diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index 07e9077d4f..bc1bf59b39 100644 --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -214,9 +214,9 @@ syn cluster vimFuncBodyList contains=vimAbb,vimAddress,vimAugroupKey,vimAutoCmd, syn match vimFunction "\\|[sSgGbBwWtTlL]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)*\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'f' - syn region vimFuncBody contained fold start="\ze\s*(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\)" contains=@vimFuncBodyList + syn region vimFuncBody contained fold start="\ze\s*(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\|enddef\>\)" contains=@vimFuncBodyList else - syn region vimFuncBody contained start="\ze\s*(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\)" contains=@vimFuncBodyList + syn region vimFuncBody contained start="\ze\s*(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\|enddef\>\)" contains=@vimFuncBodyList endif syn match vimFuncVar contained "a:\(\K\k*\|\d\+\)" syn match vimFuncSID contained "\c\|\