# HG changeset patch # User Bram Moolenaar # Date 1425586879 -3600 # Node ID 056809de0b298e7f32a76ace0575088a639f3b24 # Parent 5e7cbaa2417b90a4e697c75fb20d3bf501388153 updated for version 7.4.656 Problem: Missing changes for glob() in one file. Solution: Add the missing changes. diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 7.4. Last change: 2015 Feb 10 +*eval.txt* For Vim version 7.4. Last change: 2015 Mar 05 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1834,9 +1834,9 @@ getwinposx() Number X coord in pixels getwinposy() Number Y coord in pixels of GUI Vim window getwinvar( {nr}, {varname} [, {def}]) any variable {varname} in window {nr} -glob( {expr} [, {nosuf} [, {list}]]) +glob( {expr} [, {nosuf} [, {list} [, {alllinks}]]]) any expand file wildcards in {expr} -globpath( {path}, {expr} [, {nosuf} [, {list}]]) +globpath( {path}, {expr} [, {nosuf} [, {list} [, {alllinks}]]]) String do glob({expr}) for all dirs in {path} has( {feature}) Number TRUE if feature {feature} supported has_key( {dict}, {key}) Number TRUE if {dict} has entry {key} @@ -3638,7 +3638,7 @@ getwinvar({winnr}, {varname} [, {def}]) :let list_is_on = getwinvar(2, '&list') :echo "myvar = " . getwinvar(1, 'myvar') < -glob({expr} [, {nosuf} [, {list}]]) *glob()* +glob({expr} [, {nosuf} [, {list} [, {alllinks}]]]) *glob()* Expand the file wildcards in {expr}. See |wildcards| for the use of special characters. @@ -3655,8 +3655,11 @@ glob({expr} [, {nosuf} [, {list}]]) * matches, they are separated by characters. If the expansion fails, the result is an empty String or List. + A name for a non-existing file is not included. A symbolic link is only included if it points to an existing file. + However, when the {alllinks} argument is present and it is + non-zero then all symbolic links are included. For most systems backticks can be used to get files names from any external command. Example: > @@ -3668,7 +3671,8 @@ glob({expr} [, {nosuf} [, {list}]]) * See |expand()| for expanding special Vim variables. See |system()| for getting the raw output of an external command. -globpath({path}, {expr} [, {nosuf} [, {list}]]) *globpath()* + *globpath()* +globpath({path}, {expr} [, {nosuf} [, {list} [, {allinks}]]]) Perform glob() on all directories in {path} and concatenate the results. Example: > :echo globpath(&rtp, "syntax/c.vim") @@ -3694,6 +3698,8 @@ globpath({path}, {expr} [, {nosuf} [, {l they are separated by characters. Example: > :echo globpath(&rtp, "syntax/c.vim", 0, 1) < + {allinks} is used as with |glob()|. + The "**" item can be used to search in a directory tree. For example, to find all "README.txt" files in the directories in 'runtimepath' and below: > diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 7.4. Last change: 2015 Mar 02 +*todo.txt* For Vim version 7.4. Last change: 2015 Mar 05 VIM REFERENCE MANUAL by Bram Moolenaar @@ -78,14 +78,9 @@ https://github.com/neovim/neovim/commit/ Still using freed memory after using setloclist(). (lcd, 2014 Jul 23) More info Jul 24. Not clear why. -Patch for c.vim and cpp.vim. (Yasuhiro Matsumoto, 2015 Feb 28) - Better .ico file for Windows. (Pat Suwalski, 2015 Feb 13) Waiting for response on remark from Edward Fox. -Patch to put -ldl in LIBs rather than LDFLAGS, so that python2 and python3 can -both be used. (Oazki Kiichi, 2015 Feb 28) - Patch to make getregtype() return the right size for non-linux systems. (Yasuhiro Matsumoto, 2014 Jul 8) Breaks test_eval. Inefficient, can we only compute y_width when needed? @@ -98,10 +93,10 @@ Problem using ":try" inside ":execute". ":cd C:\Windows\System32\drivers\etc*" does not work, even though the directory exists. (Sergio Gallelli, 2013 Dec 29) -Patch to make 7.4.582 work for multi-byte. (Yasuhiro Matsumoto, 2015 Mar 1) - C indent: should recognize C11 raw strings. (Mark Lodato, 2015 Mar 1) +Intel Hex syntax file update, Markus Heidelberg 2015 Mar 2 + Gvim: when both Tab and CTRL-I are mapped, use CTRL-I not for Tab. Python: ":py raw_input('prompt')" doesn't work. (Manu Hack) @@ -126,43 +121,17 @@ Goes away when disabling the swap file. MS-Windows: Crash opening very long file name starting with "\\". (Christian Brock, 2012 Jun 29) -Syntax files for Innovation Data processing. (Rob Owens, 2015 Feb 4) - -Add a few features to xxd. (Vadim Vygonets, 2013 Nov 11) -Patches: 2013 Nov 19 -1: Add -e: little endian hexdump -2: Add -o: add offset to displayed position -3: Change displayed file position width to 8 chars - -Using CTRL-L while popup menu is visible behaves like CTRL-P, which is wrong. -Patch by Yasuhiro Matsumoto, 2015 Jan 5. -Is this right? Comment from Amadeus Demarzi. -Another patch from Christian, Jan 6. -Comment from Hirohito Higashi, Jan 6, update Feb 8, update Feb 17. - -HTML indenting: adjustments for html5. (Michaelpg, 2015 Feb 23) - -glob() omits symbolic links to non-existing files. -(Charles Campbell, 2015 Feb 19) -Patch by James McCoy, 2015 Feb 20. -Docs change suggestion by Roland Eggner, 2015 Feb 21. -Probably "to a not existing file" should be "to a non-existing file". -Also fix globpath(). +Patch to handle directories better for --remote. (xaizek, 2015 Mar 1) Cursorline background color not mixed with character highlight. Patch by Yasuhiro Matsumoto, 2014 Dec 3. -Patch to fix temp directories for Windows, so that it works without tweaking. -Issue 28. -Also see http://superuser.com/questions/364879/how-to-open-a-new-file-in-gvim-e303-unable-to-open-swap-file +The argument for "-S" is not taken literally, the ":so" command expands +wildcards. Add a ":nowild" command modifier? (ZyX, 2015 March 4) Problem using diff syntax with cp932 encoding. Idea from Yasuhiro Matsumoto, patch from Ken Takata (2014 Nov 6) -text deleted by "dit" depends on indent of closing tag. -(Jan Parthey, 2015 Feb 8) -Patch by Christian, Feb 9. Update Feb 13. - ml_updatechunk() is slow when retrying for another encoding. (John Little, 2014 Sep 11) diff --git a/runtime/indent/html.vim b/runtime/indent/html.vim --- a/runtime/indent/html.vim +++ b/runtime/indent/html.vim @@ -245,6 +245,10 @@ call s:AddITags(s:indent_tags, [ \ 'header', 'group', 'keygen', 'mark', 'math', 'meter', 'nav', 'output', \ 'progress', 'ruby', 'section', 'svg', 'texture', 'time', 'video', \ 'wbr', 'text']) + +" Tags added for web components: +call s:AddITags(s:indent_tags, [ + \ 'content', 'shadow', 'template']) "}}} " Add Block Tags: these contain alien content @@ -287,7 +291,7 @@ func! s:CountITags(text) let s:nextrel = 0 " relative indent steps for next line [unit &sw]: let s:block = 0 " assume starting outside of a block let s:countonly = 1 " don't change state - call substitute(a:text, '<\zs/\=\w\+\>\|', '\=s:CheckTag(submatch(0))', 'g') + call substitute(a:text, '<\zs/\=\w\+\(-\w\+\)*\>\|', '\=s:CheckTag(submatch(0))', 'g') let s:countonly = 0 endfunc "}}} @@ -299,7 +303,7 @@ func! s:CountTagsAndState(text) let s:nextrel = 0 " relative indent steps for next line [unit &sw]: let s:block = b:hi_newstate.block - let tmp = substitute(a:text, '<\zs/\=\w\+\>\|', '\=s:CheckTag(submatch(0))', 'g') + let tmp = substitute(a:text, '<\zs/\=\w\+\(-\w\+\)*\>\|', '\=s:CheckTag(submatch(0))', 'g') if s:block == 3 let b:hi_newstate.scripttype = s:GetScriptType(matchstr(tmp, '\C.*\zs[^>]*')) endif @@ -311,6 +315,9 @@ func! s:CheckTag(itag) "{{{ " Returns an empty string or "SCRIPT". " a:itag can be "tag" or "/tag" or "" + if (s:CheckCustomTag(a:itag)) + return "" + endif let ind = s:get_tag(a:itag) if ind == -1 " closing tag @@ -365,6 +372,36 @@ func! s:CheckBlockTag(blocktag, ind) return "" endfunc "}}} +" Used by s:CheckTag(). +func! s:CheckCustomTag(ctag) + "{{{ + " Returns 1 if ctag is the tag for a custom element, 0 otherwise. + " a:ctag can be "tag" or "/tag" or "" + let pattern = '\%\(\w\+-\)\+\w\+' + if match(a:ctag, pattern) == -1 + return 0 + endif + if matchstr(a:ctag, '\/\ze.\+') == "/" + " closing tag + if s:block != 0 + " ignore ctag within a block + return 1 + endif + if s:nextrel == 0 + let s:curind -= 1 + else + let s:nextrel -= 1 + endif + else + " opening tag + if s:block != 0 + return 1 + endif + let s:nextrel += 1 + endif + return 1 +endfunc "}}} + " Return the