aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/doc/autocmd.txt9
-rw-r--r--runtime/doc/eval.txt16
-rw-r--r--runtime/doc/help.txt13
-rw-r--r--runtime/doc/syntax.txt28
-rw-r--r--runtime/doc/usr_02.txt6
-rw-r--r--runtime/filetype.vim4
-rw-r--r--runtime/ftplugin/j.vim7
-rw-r--r--runtime/indent/html.vim41
-rw-r--r--runtime/syntax/c.vim22
-rw-r--r--runtime/syntax/cpp.vim15
-rw-r--r--runtime/syntax/upstreamdat.vim11
-rw-r--r--runtime/syntax/upstreamrpt.vim310
-rw-r--r--runtime/syntax/usw2kagtlog.vim10
-rw-r--r--runtime/syntax/yaml.vim104
-rw-r--r--runtime/vimrc_example.vim4
-rw-r--r--src/nvim/path.c39
-rw-r--r--src/nvim/regexp.c101
-rw-r--r--src/nvim/strings.c8
-rw-r--r--src/nvim/version.c4
19 files changed, 622 insertions, 130 deletions
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt
index 140a2f2e66..e17281821c 100644
--- a/runtime/doc/autocmd.txt
+++ b/runtime/doc/autocmd.txt
@@ -1,4 +1,4 @@
-*autocmd.txt* For Vim version 7.4. Last change: 2014 Sep 23
+*autocmd.txt* For Vim version 7.4. Last change: 2015 Mar 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -973,6 +973,13 @@ WinLeave Before leaving a window. If the window to be
==============================================================================
6. Patterns *autocmd-patterns* *{pat}*
+The {pat} argument can be a comma separated list. This works as if the
+command was given with each pattern separately. Thus this command: >
+ :autocmd BufRead *.txt,*.info set et
+Is equivalent to: >
+ :autocmd BufRead *.txt set et
+ :autocmd BufRead *.info set et
+
The file pattern {pat} is tested for a match against the file name in one of
two ways:
1. When there is no '/' in the pattern, Vim checks for a match against only
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index f0747dad1b..6bdfa8dc8a 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -524,7 +524,7 @@ Funcref to a Dictionary, but the "self" variable is not available then.
To avoid the extra name for the function it can be defined and directly
assigned to a Dictionary in this way: >
:let mydict = {'data': [0, 1, 2, 3]}
- :function mydict.len() dict
+ :function mydict.len()
: return len(self.data)
:endfunction
:echo mydict.len()
@@ -1862,10 +1862,10 @@ getwinposx() Number X coord in pixels of GUI Vim window
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}
glob2regpat( {expr}) String convert a glob pat into a search pat
-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}
@@ -3754,7 +3754,7 @@ getwinvar({winnr}, {varname} [, {def}]) *getwinvar()*
: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.
@@ -3771,8 +3771,11 @@ glob({expr} [, {nosuf} [, {list}]]) *glob()*
matches, they are separated by <NL> 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: >
@@ -3792,7 +3795,8 @@ glob2regpat({expr}) *glob2regpat()*
< This is equivalent to: >
if filename =~ '^Make.*\.mak$'
<
-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")
@@ -3818,6 +3822,8 @@ globpath({path}, {expr} [, {nosuf} [, {list}]]) *globpath()*
they are separated by <NL> 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/help.txt b/runtime/doc/help.txt
index 766a440cb3..3d44ed83d7 100644
--- a/runtime/doc/help.txt
+++ b/runtime/doc/help.txt
@@ -1,4 +1,4 @@
-*help.txt* For Vim version 7.4. Last change: 2012 Dec 06
+*help.txt* For Vim version 7.4. Last change: 2015 Apr 11
VIM - main help file
k
@@ -23,6 +23,7 @@ Get specific help: It is possible to go directly to whatever you want help
Command-line editing c_ :help c_<Del>
Vim command argument - :help -r
Option ' :help 'textwidth'
+ Regular expression / :help /[
Search for help: Type ":help word", then hit CTRL-D to see matching
help entries for "word".
Or use ":helpgrep word". |:helpgrep|
@@ -170,6 +171,16 @@ Standard plugins ~
|pi_zip.txt| Zip archive explorer
LOCAL ADDITIONS: *local-additions*
+|Mines.txt| The Mines Game Jul 30, 2009
+|Tabular.txt| Configurable, flexible, intuitive text aligning
+|cecutil.txt| DrChip's Utilities Jun 11, 2004
+|example.txt| Example for a locally added help file
+|matchit.txt| Extended "%" matching
+|pi_netrw.txt| For Vim version 7.4. Last change: 2014 Jul 09
+|synchk.txt| Syntax Checker May 15, 2013
+|test.txt| Testing the hélp cömmånd nôw
+|typecorr.txt| Plugin for correcting typing mistakes
+|helpp.txt| Dummy line to avoid an error message
------------------------------------------------------------------------------
*bars* Bars example
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index 6603d65645..6aed7441a0 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -1,4 +1,4 @@
-*syntax.txt* For Vim version 7.4. Last change: 2015 Mar 20
+*syntax.txt* For Vim version 7.4. Last change: 2015 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -3307,6 +3307,32 @@ must not click outside of the pixel strings, but feel free to improve it.
It will look much better with a font in a quadratic cell size, e.g. for X: >
:set guifont=-*-clean-medium-r-*-*-8-*-*-*-*-80-*
+
+YAML *yaml.vim* *ft-yaml-syntax*
+
+ *g:yaml_schema* *b:yaml_schema*
+A YAML schema is a combination of a set of tags and a mechanism for resolving
+non-specific tags. For user this means that YAML parser may, depending on
+plain scalar contents, treat plain scalar (which can actually be only string
+and nothing else) as a value of the other type: null, boolean, floating-point,
+integer. `g:yaml_schema` option determines according to which schema values
+will be highlighted specially. Supported schemas are
+
+Schema Description ~
+failsafe No additional highlighting.
+json Supports JSON-style numbers, booleans and null.
+core Supports more number, boolean and null styles.
+pyyaml In addition to core schema supports highlighting timestamps,
+ but there are some differences in what is recognized as
+ numbers and many additional boolean values not present in core
+ schema.
+
+Default schema is `core`.
+
+Note that schemas are not actually limited to plain scalars, but this is the
+only difference between schemas defined in YAML specification and the only
+difference defined in the syntax file.
+
==============================================================================
5. Defining a syntax *:syn-define* *E410*
diff --git a/runtime/doc/usr_02.txt b/runtime/doc/usr_02.txt
index f81a4e3a2c..6a288f8965 100644
--- a/runtime/doc/usr_02.txt
+++ b/runtime/doc/usr_02.txt
@@ -1,4 +1,4 @@
-*usr_02.txt* For Vim version 7.4. Last change: 2010 Jul 20
+*usr_02.txt* For Vim version 7.4. Last change: 2015 Apr 12
VIM USER MANUAL - by Bram Moolenaar
@@ -516,9 +516,11 @@ Summary: *help-summary* >
:help subject()
< Function "subject". >
:help -subject
-< Command-line option "-subject". >
+< Command-line argument "-subject". >
:help +subject
< Compile-time feature "+subject". >
+ :help /*
+< Regular expression item "*" >
:help EventName
< Autocommand event "EventName". >
:help digraphs.txt
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 37a20be984..c5b01f0c40 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2015 Mar 13
+" Last Change: 2015 Apr 06
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -1290,7 +1290,7 @@ au BufNewFile,BufRead *.mush setf mush
au BufNewFile,BufRead Mutt{ng,}rc setf muttrc
" Nano
-au BufNewFile,BufRead */etc/nanorc,.nanorc setf nanorc
+au BufNewFile,BufRead */etc/nanorc,*.nanorc setf nanorc
" Nastran input/DMAP
"au BufNewFile,BufRead *.dat setf nastran
diff --git a/runtime/ftplugin/j.vim b/runtime/ftplugin/j.vim
index 71ac4c5418..774696836f 100644
--- a/runtime/ftplugin/j.vim
+++ b/runtime/ftplugin/j.vim
@@ -2,7 +2,7 @@
" Language: J
" Maintainer: David Bürgin <676c7473@gmail.com>
" URL: https://github.com/glts/vim-j
-" Last Change: 2015-01-11
+" Last Change: 2015-03-27
if exists('b:did_ftplugin')
finish
@@ -16,12 +16,9 @@ setlocal iskeyword=48-57,A-Z,_,a-z
setlocal comments=:NB.
setlocal commentstring=NB.\ %s
setlocal formatoptions-=t
-setlocal shiftwidth=2
-setlocal softtabstop=2
-setlocal expandtab
setlocal matchpairs=(:)
-let b:undo_ftplugin = 'setlocal matchpairs< expandtab< softtabstop< shiftwidth< formatoptions< commentstring< comments< iskeyword<'
+let b:undo_ftplugin = 'setlocal matchpairs< formatoptions< commentstring< comments< iskeyword<'
" Section movement with ]] ][ [[ []. The start/end patterns below are amended
" inside the function in order to avoid matching on the current cursor line.
diff --git a/runtime/indent/html.vim b/runtime/indent/html.vim
index b97a905988..71443abe5b 100644
--- 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.*<SCRIPT\>\zs[^>]*'))
endif
@@ -311,6 +315,9 @@ func! s:CheckTag(itag)
"{{{
" Returns an empty string or "SCRIPT".
" a:itag can be "tag" or "/tag" or "<!--" 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 "<!--" 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 <script> type: either "javascript" or ""
func! s:GetScriptType(str)
"{{{
diff --git a/runtime/syntax/c.vim b/runtime/syntax/c.vim
index a520e6317f..ac4909edba 100644
--- a/runtime/syntax/c.vim
+++ b/runtime/syntax/c.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2015 Feb 27
+" Last Change: 2015 Mar 05
" Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
@@ -47,16 +47,17 @@ if !exists("c_no_cformat")
endif
" cCppString: same as cString, but ends at end of line
-if s:ft ==# "cpp" && !exists("cpp_no_cpp11")
+if s:ft ==# "cpp" && !exists("cpp_no_cpp11") && !exists("c_no_cformat")
" ISO C++11
syn region cString start=+\(L\|u\|u8\|U\|R\|LR\|u8R\|uR\|UR\)\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend
syn region cCppString start=+\(L\|u\|u8\|U\|R\|LR\|u8R\|uR\|UR\)\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell
-elseif s:ft ==# "c" && !exists("c_no_c11")
+elseif s:ft ==# "c" && !exists("c_no_c11") && !exists("c_no_cformat")
" ISO C99
syn region cString start=+\%(L\|U\|u8\)\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend
syn region cCppString start=+\%(L\|U\|u8\)\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell
else
" older C or C++
+ syn match cFormat display "%%" contained
syn region cString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend
syn region cCppString start=+L\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell
endif
@@ -80,7 +81,11 @@ syn match cSpecialCharacter display "L'\\x\x\+'"
if (s:ft ==# "c" && !exists("c_no_c11")) || (s:ft ==# "cpp" && !exists("cpp_no_cpp11"))
" ISO C11 or ISO C++ 11
- syn region cString start=+\%(U\|u8\=\)"+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend
+ if exists("c_no_cformat")
+ syn region cString start=+\%(U\|u8\=\)"+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,@Spell extend
+ else
+ syn region cString start=+\%(U\|u8\=\)"+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend
+ endif
syn match cCharacter "[Uu]'[^\\]'"
syn match cCharacter "[Uu]'[^']*'" contains=cSpecial
if exists("c_gnu")
@@ -389,8 +394,13 @@ endif
syn cluster cLabelGroup contains=cUserLabel
syn match cUserCont display "^\s*\I\i*\s*:$" contains=@cLabelGroup
syn match cUserCont display ";\s*\I\i*\s*:$" contains=@cLabelGroup
-syn match cUserCont display "^\s*\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
-syn match cUserCont display ";\s*\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
+if s:ft ==# 'cpp'
+ syn match cUserCont display "^\s*\%(class\|struct\|enum\)\@!\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
+ syn match cUserCont display ";\s*\%(class\|struct\|enum\)\@!\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
+else
+ syn match cUserCont display "^\s*\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
+ syn match cUserCont display ";\s*\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup
+endif
syn match cUserLabel display "\I\i*" contained
diff --git a/runtime/syntax/cpp.vim b/runtime/syntax/cpp.vim
index 15f0cbb4ff..526ecbcd53 100644
--- a/runtime/syntax/cpp.vim
+++ b/runtime/syntax/cpp.vim
@@ -1,8 +1,8 @@
" Vim syntax file
" Language: C++
-" Current Maintainer: vim-jp (https://github.com/vim-jp/cpp-vim)
+" Current Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp)
" Previous Maintainer: Ken Shan <ccshan@post.harvard.edu>
-" Last Change: 2014 May 14
+" Last Change: 2015 Mar 1
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
@@ -32,14 +32,21 @@ syn match cppCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*$"
syn keyword cppStorageClass mutable
syn keyword cppStructure class typename template namespace
syn keyword cppBoolean true false
+syn keyword cppConstant __cplusplus
" C++ 11 extensions
if !exists("cpp_no_cpp11")
syn keyword cppType override final
syn keyword cppExceptions noexcept
- syn keyword cppStorageClass constexpr decltype
+ syn keyword cppStorageClass constexpr decltype thread_local
syn keyword cppConstant nullptr
- syn region cppRawString matchgroup=cppRawDelimiter start=+\%(u8\|[uLU]\)\=R"\z([[:alnum:]_{}[\]#<>%:;.?*\+\-/\^&|~!=,"']\{,16}\)(+ end=+)\z1"+ contains=@Spell
+ syn keyword cppConstant ATOMIC_FLAG_INIT ATOMIC_VAR_INIT
+ syn keyword cppConstant ATOMIC_BOOL_LOCK_FREE ATOMIC_CHAR_LOCK_FREE
+ syn keyword cppConstant ATOMIC_CHAR16_T_LOCK_FREE ATOMIC_CHAR32_T_LOCK_FREE
+ syn keyword cppConstant ATOMIC_WCHAR_T_LOCK_FREE ATOMIC_SHORT_LOCK_FREE
+ syn keyword cppConstant ATOMIC_INT_LOCK_FREE ATOMIC_LONG_LOCK_FREE
+ syn keyword cppConstant ATOMIC_LLONG_LOCK_FREE ATOMIC_POINTER_LOCK_FREE
+ syn region cppRawString matchgroup=cppRawDelimiter start=+\%(u8\|[uLU]\)\=R"\z([[:alnum:]_{}[\]#<>%:;.?*\+\-/\^&|~!=,"']\{,16}\)(+ end=+)\z1"+ contains=@Spell
endif
" The minimum and maximum operators in GNU C++
diff --git a/runtime/syntax/upstreamdat.vim b/runtime/syntax/upstreamdat.vim
index 7be806730d..e3b415a4bc 100644
--- a/runtime/syntax/upstreamdat.vim
+++ b/runtime/syntax/upstreamdat.vim
@@ -1,13 +1,14 @@
" Vim syntax file
" Language: Innovation Data Processing upstream.dat file
" Maintainer: Rob Owens <rowens@fdrinnovation.com>
-" Latest Revision: 2013-06-17
+" Latest Revision: 2013-11-27
" Quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
+" Parameters:
syn keyword upstreamdat_Parameter ACCEPTPCREMOTE
syn keyword upstreamdat_Parameter ACCEPTREMOTE
syn keyword upstreamdat_Parameter ACTION
@@ -291,6 +292,14 @@ syn keyword upstreamdat_Parameter XFERECORDSIZE
syn keyword upstreamdat_Parameter XFERRECSEP
syn keyword upstreamdat_Parameter XFERRECUSECR
+" File Specs:
+syn match upstreamdat_Filespec /file spec\c \d\{1,3}.*/
+
+" Comments:
+syn match upstreamdat_Comment /^#.*/
+
hi def link upstreamdat_Parameter Type
+"hi def link upstreamdat_Filespec Underlined
+hi def link upstreamdat_Comment Comment
let b:current_syntax = "upstreamdat"
diff --git a/runtime/syntax/upstreamrpt.vim b/runtime/syntax/upstreamrpt.vim
new file mode 100644
index 0000000000..170fc8f509
--- /dev/null
+++ b/runtime/syntax/upstreamrpt.vim
@@ -0,0 +1,310 @@
+" Vim syntax file
+" Language: Innovation Data Processing upstream.rpt file
+" Maintainer: Rob Owens <rowens@fdrinnovation.com>
+" Latest Revision: 2014-03-13
+
+" Quit when a syntax file was already loaded
+if exists("b:current_syntax")
+ finish
+endif
+
+setlocal foldmethod=syntax
+
+" Parameters:
+syn keyword upstreamdat_Parameter ACCEPTPCREMOTE
+syn keyword upstreamdat_Parameter ACCEPTREMOTE
+syn keyword upstreamdat_Parameter ACTION
+syn keyword upstreamdat_Parameter ACTIVATEONENTRY
+syn keyword upstreamdat_Parameter ARCHIVEBIT
+syn keyword upstreamdat_Parameter ARCHIVEBIT
+syn keyword upstreamdat_Parameter ASCTOEBC
+syn keyword upstreamdat_Parameter ASRBACKUP
+syn keyword upstreamdat_Parameter ATTENDED
+syn keyword upstreamdat_Parameter AUTHORITATIVE
+syn keyword upstreamdat_Parameter AUTHORITATIVERESTORE
+syn keyword upstreamdat_Parameter AUTHORITATIVERESTORE
+syn keyword upstreamdat_Parameter BACKUPPROFILE
+syn keyword upstreamdat_Parameter BACKUPPROFILE2
+syn keyword upstreamdat_Parameter BACKUPREPARSEFILES
+syn keyword upstreamdat_Parameter BACKUPREPARSEFILES
+syn keyword upstreamdat_Parameter BACKUPVERIFY
+syn keyword upstreamdat_Parameter BLANKTRUNC
+syn keyword upstreamdat_Parameter CALCDASDSIZE
+syn keyword upstreamdat_Parameter CHANGEDIRATTRIBS
+syn keyword upstreamdat_Parameter CHANGEDIRATTRIBS
+syn keyword upstreamdat_Parameter COMPRESSLEVEL
+syn keyword upstreamdat_Parameter CONTROLFILE
+syn keyword upstreamdat_Parameter DASDOVERRIDE
+syn keyword upstreamdat_Parameter DATELIMIT
+syn keyword upstreamdat_Parameter DATELIMIT
+syn keyword upstreamdat_Parameter DAYSOLD
+syn keyword upstreamdat_Parameter DAYSOLD
+syn keyword upstreamdat_Parameter DELETED
+syn keyword upstreamdat_Parameter DELETED
+syn keyword upstreamdat_Parameter DELETEPROMPTS
+syn keyword upstreamdat_Parameter DELETEPROMPTS
+syn keyword upstreamdat_Parameter DESTINATION
+syn keyword upstreamdat_Parameter DESTINATION
+syn keyword upstreamdat_Parameter DIRDELETE
+syn keyword upstreamdat_Parameter DIRECTORVMC
+syn keyword upstreamdat_Parameter DIRONLYRESTOREOK
+syn keyword upstreamdat_Parameter DIRSONLY
+syn keyword upstreamdat_Parameter DIRSONLY
+syn keyword upstreamdat_Parameter DISASTERRECOVERY
+syn keyword upstreamdat_Parameter DISPLAY
+syn keyword upstreamdat_Parameter DRIVEALIAS
+syn keyword upstreamdat_Parameter DRIVEALIAS
+syn keyword upstreamdat_Parameter DUALCOPY
+syn keyword upstreamdat_Parameter DUPDAYS
+syn keyword upstreamdat_Parameter DUPLICATE
+syn keyword upstreamdat_Parameter EBCTOASC
+syn keyword upstreamdat_Parameter ENCRYPT
+syn keyword upstreamdat_Parameter ENCRYPTLEVEL
+syn keyword upstreamdat_Parameter EXCLUDELISTNAME
+syn keyword upstreamdat_Parameter FAILBACKUPONERROR
+syn keyword upstreamdat_Parameter FAILBACKUPONERROR
+syn keyword upstreamdat_Parameter FAILIFNOFILES
+syn keyword upstreamdat_Parameter FAILIFNOFILES
+syn keyword upstreamdat_Parameter FAILIFSKIP
+syn keyword upstreamdat_Parameter FAILJOB
+syn keyword upstreamdat_Parameter FAILRESTOREONERROR
+syn keyword upstreamdat_Parameter FAILRESTOREONERROR
+syn keyword upstreamdat_Parameter FILEDATE
+syn keyword upstreamdat_Parameter FILEDATE
+syn keyword upstreamdat_Parameter FILEDELETE
+syn keyword upstreamdat_Parameter FILEDELETE
+syn keyword upstreamdat_Parameter FILES
+syn keyword upstreamdat_Parameter FILES
+syn keyword upstreamdat_Parameter FILESOPENFORUPDAT
+syn keyword upstreamdat_Parameter FILESOPENFORUPDAT
+syn keyword upstreamdat_Parameter FILETRANSFER
+syn keyword upstreamdat_Parameter GETREMOTEFILES
+syn keyword upstreamdat_Parameter HARDLINKDB
+syn keyword upstreamdat_Parameter HARDLINKS
+syn keyword upstreamdat_Parameter HARDLINKS
+syn keyword upstreamdat_Parameter HIDDENFILES
+syn keyword upstreamdat_Parameter HIDDENFILES
+syn keyword upstreamdat_Parameter HOLDTAPE
+syn keyword upstreamdat_Parameter HOLDUSERDIRS
+syn keyword upstreamdat_Parameter HOSTFILENAME
+syn keyword upstreamdat_Parameter HOSTRECORD
+syn keyword upstreamdat_Parameter HOSTSORT
+syn keyword upstreamdat_Parameter IGNOREPLUGINSFORRESTORE
+syn keyword upstreamdat_Parameter INCRDB
+syn keyword upstreamdat_Parameter INCRDBARCHIVEBIT
+syn keyword upstreamdat_Parameter INCRDBDELETEDFILES
+syn keyword upstreamdat_Parameter INCREMENTAL
+syn keyword upstreamdat_Parameter INCREMENTAL
+syn keyword upstreamdat_Parameter INQOPTIONS
+syn keyword upstreamdat_Parameter INSTALLWIN2KAGENT
+syn keyword upstreamdat_Parameter INSTALLWIN2KAGENT
+syn keyword upstreamdat_Parameter JOBOPTIONS
+syn keyword upstreamdat_Parameter JOBRETURNCODEMAP
+syn keyword upstreamdat_Parameter JOBWAITTIMELIMIT
+syn keyword upstreamdat_Parameter KEEPALIVE
+syn keyword upstreamdat_Parameter LANINTERFACE
+syn keyword upstreamdat_Parameter LANWSNAME
+syn keyword upstreamdat_Parameter LANWSPASSWORD
+syn keyword upstreamdat_Parameter LASTACCESS
+syn keyword upstreamdat_Parameter LASTACCESS
+syn keyword upstreamdat_Parameter LATESTDATE
+syn keyword upstreamdat_Parameter LATESTDATE
+syn keyword upstreamdat_Parameter LATESTTIME
+syn keyword upstreamdat_Parameter LATESTTIME
+syn keyword upstreamdat_Parameter LATESTVERSION
+syn keyword upstreamdat_Parameter LINEBLOCK
+syn keyword upstreamdat_Parameter LINETRUNC
+syn keyword upstreamdat_Parameter LISTENFORREMOTE
+syn keyword upstreamdat_Parameter LOCALBACKUP
+syn keyword upstreamdat_Parameter LOCALBACKUPDIR
+syn keyword upstreamdat_Parameter LOCALBACKUPMAX
+syn keyword upstreamdat_Parameter LOCALBACKUPMAXFILESIZE
+syn keyword upstreamdat_Parameter LOCALBACKUPMAXSIZE
+syn keyword upstreamdat_Parameter LOCALEXCLUDEFILE
+syn keyword upstreamdat_Parameter LOCALPARAMETERS
+syn keyword upstreamdat_Parameter LOCALPASSWORD
+syn keyword upstreamdat_Parameter LOCALRESTORE
+syn keyword upstreamdat_Parameter LOCALUSER
+syn keyword upstreamdat_Parameter LOFS
+syn keyword upstreamdat_Parameter LOGNONFATAL
+syn keyword upstreamdat_Parameter MAXBACKUPFILESFAIL
+syn keyword upstreamdat_Parameter MAXBACKUPTIME
+syn keyword upstreamdat_Parameter MAXDUPS
+syn keyword upstreamdat_Parameter MAXFILENAMESIZE
+syn keyword upstreamdat_Parameter MAXKFILESIZE
+syn keyword upstreamdat_Parameter MAXLOGDAYS
+syn keyword upstreamdat_Parameter MAXRESTOREFILESFAIL
+syn keyword upstreamdat_Parameter MAXRESTORETIME
+syn keyword upstreamdat_Parameter MAXRETRY
+syn keyword upstreamdat_Parameter MAXRPTDAYS
+syn keyword upstreamdat_Parameter MERGE
+syn keyword upstreamdat_Parameter MIGRBITS
+syn keyword upstreamdat_Parameter MIGRBITS
+syn keyword upstreamdat_Parameter MINCOMPRESSSIZE
+syn keyword upstreamdat_Parameter MINIMIZE
+syn keyword upstreamdat_Parameter MODIFYFILE
+syn keyword upstreamdat_Parameter MOUNTPOINTS
+syn keyword upstreamdat_Parameter MOUNTPOINTS
+syn keyword upstreamdat_Parameter NDS
+syn keyword upstreamdat_Parameter NDS
+syn keyword upstreamdat_Parameter NEWFILECOMPARE
+syn keyword upstreamdat_Parameter NFSBELOW
+syn keyword upstreamdat_Parameter NODATAOK
+syn keyword upstreamdat_Parameter NODIRFORINCREMENTAL
+syn keyword upstreamdat_Parameter NODIRFORINCREMENTAL
+syn keyword upstreamdat_Parameter NONFILEDATABITMAP
+syn keyword upstreamdat_Parameter NONFILEDATABITMAP
+syn keyword upstreamdat_Parameter NOPOINTRESTORE
+syn keyword upstreamdat_Parameter NOSPECINHERITANCE
+syn keyword upstreamdat_Parameter NOTIFYEVENTS
+syn keyword upstreamdat_Parameter NOTIFYFAILUREATTACHMENT
+syn keyword upstreamdat_Parameter NOTIFYSUCCESSATTACHMENT
+syn keyword upstreamdat_Parameter NOTIFYTARGETS
+syn keyword upstreamdat_Parameter NOUIDGIDNAMES
+syn keyword upstreamdat_Parameter NOUIDGIDNAMES
+syn keyword upstreamdat_Parameter NOVELLMIGRATE
+syn keyword upstreamdat_Parameter NOVELLMIGRATE
+syn keyword upstreamdat_Parameter NOVELLMIGRATEADDEXT
+syn keyword upstreamdat_Parameter NOVELLMIGRATEADDEXT
+syn keyword upstreamdat_Parameter NOVELLPROFILE
+syn keyword upstreamdat_Parameter NOVELLRECALL
+syn keyword upstreamdat_Parameter NTFSADDPERMISSION
+syn keyword upstreamdat_Parameter NTFSADDPERMISSION
+syn keyword upstreamdat_Parameter NTREGRESTORE
+syn keyword upstreamdat_Parameter OSTYPE
+syn keyword upstreamdat_Parameter OUTPORT
+syn keyword upstreamdat_Parameter PACKFLUSHAFTERFILE
+syn keyword upstreamdat_Parameter PACKRECSIZE
+syn keyword upstreamdat_Parameter PARAMETER
+syn keyword upstreamdat_Parameter PASSWORD
+syn keyword upstreamdat_Parameter PATHNAME
+syn keyword upstreamdat_Parameter PATHNAME
+syn keyword upstreamdat_Parameter PERFORMBITMAP
+syn keyword upstreamdat_Parameter PERFORMNUMRECORDS
+syn keyword upstreamdat_Parameter PERFORMRECORDSIZE
+syn keyword upstreamdat_Parameter PLUGIN
+syn keyword upstreamdat_Parameter PLUGIN
+syn keyword upstreamdat_Parameter PLUGINPARAMETERS
+syn keyword upstreamdat_Parameter PLUGINPARAMETERS
+syn keyword upstreamdat_Parameter POSTJOB
+syn keyword upstreamdat_Parameter PREJOB
+syn keyword upstreamdat_Parameter PRTYCLASS
+syn keyword upstreamdat_Parameter PRTYLEVEL
+syn keyword upstreamdat_Parameter RECALLCLEANUP
+syn keyword upstreamdat_Parameter RECALLOFFLINEFILES
+syn keyword upstreamdat_Parameter RECALLOFFLINEFILES
+syn keyword upstreamdat_Parameter RECORDSIZE
+syn keyword upstreamdat_Parameter REMOTEADDR
+syn keyword upstreamdat_Parameter REMOTEAPPLPREF
+syn keyword upstreamdat_Parameter REMOTEAPPLRETRY
+syn keyword upstreamdat_Parameter REMOTECONNECTTYPE
+syn keyword upstreamdat_Parameter REMOTEFLAGS
+syn keyword upstreamdat_Parameter REMOTEIPADAPTER
+syn keyword upstreamdat_Parameter REMOTELOCALPARAMETERS
+syn keyword upstreamdat_Parameter REMOTELOGMODE
+syn keyword upstreamdat_Parameter REMOTELUNAME
+syn keyword upstreamdat_Parameter REMOTEMAXRETRIES
+syn keyword upstreamdat_Parameter REMOTEMODENAME
+syn keyword upstreamdat_Parameter REMOTEPARAMETERFILE
+syn keyword upstreamdat_Parameter REMOTEPORT
+syn keyword upstreamdat_Parameter REMOTEREQUEST
+syn keyword upstreamdat_Parameter REMOTERESTART
+syn keyword upstreamdat_Parameter REMOTEROUTE
+syn keyword upstreamdat_Parameter REMOTETARGETNAME
+syn keyword upstreamdat_Parameter REMOTETCP
+syn keyword upstreamdat_Parameter REMOTETIMEOUT
+syn keyword upstreamdat_Parameter REMOTETMAXRETRY
+syn keyword upstreamdat_Parameter REMOTETPN
+syn keyword upstreamdat_Parameter REMOTEUSAPPL
+syn keyword upstreamdat_Parameter REMOTEVERIFY
+syn keyword upstreamdat_Parameter REMOTEWTOCOMP
+syn keyword upstreamdat_Parameter REPORTNAME
+syn keyword upstreamdat_Parameter REPORTOPTIONS
+syn keyword upstreamdat_Parameter RESTARTLASTFILE
+syn keyword upstreamdat_Parameter RESTART
+syn keyword upstreamdat_Parameter RESTARTTYPE
+syn keyword upstreamdat_Parameter RESTARTVERSIONDATE
+syn keyword upstreamdat_Parameter RESTOREARCHIVEBIT
+syn keyword upstreamdat_Parameter RESTORECHECKPOINT
+syn keyword upstreamdat_Parameter RESTOREDATELIMIT
+syn keyword upstreamdat_Parameter RESTOREDATELIMIT
+syn keyword upstreamdat_Parameter RESTOREFILEFAIL
+syn keyword upstreamdat_Parameter RESTOREMOUNTPOINTS
+syn keyword upstreamdat_Parameter RESTOREMOUNTPOINTS
+syn keyword upstreamdat_Parameter RESTORESEGMENTS
+syn keyword upstreamdat_Parameter RESTORESEGMENTS
+syn keyword upstreamdat_Parameter RESTORETODIFFFS
+syn keyword upstreamdat_Parameter RETAIN
+syn keyword upstreamdat_Parameter RETAIN
+syn keyword upstreamdat_Parameter ROOTENTRY
+syn keyword upstreamdat_Parameter ROOTENTRY
+syn keyword upstreamdat_Parameter SAN
+syn keyword upstreamdat_Parameter SCHEDULENAME
+syn keyword upstreamdat_Parameter SEGMENTEDFILESIZE
+syn keyword upstreamdat_Parameter SEGMENTEDFILESIZE
+syn keyword upstreamdat_Parameter SEGMENTSIZE
+syn keyword upstreamdat_Parameter SEGMENTSIZE
+syn keyword upstreamdat_Parameter SENDHOSTDETAILS
+syn keyword upstreamdat_Parameter SINGLEFS
+syn keyword upstreamdat_Parameter SIZETRC
+syn keyword upstreamdat_Parameter SKIP
+syn keyword upstreamdat_Parameter SKIPBACKUPSCAN
+syn keyword upstreamdat_Parameter SKIPOLD
+syn keyword upstreamdat_Parameter SKIPOLD
+syn keyword upstreamdat_Parameter SMSTARGETSERVICENAME
+syn keyword upstreamdat_Parameter SMSTSA
+syn keyword upstreamdat_Parameter SOLO
+syn keyword upstreamdat_Parameter SORTBACKUP
+syn keyword upstreamdat_Parameter SOSDISK
+syn keyword upstreamdat_Parameter SOSDISK
+syn keyword upstreamdat_Parameter SOSTIMESTAMP
+syn keyword upstreamdat_Parameter SOSTIMESTAMP
+syn keyword upstreamdat_Parameter SOSTIMESTAMPPATH
+syn keyword upstreamdat_Parameter SOSTIMESTAMPPATH
+syn keyword upstreamdat_Parameter SPECNUMBER
+syn keyword upstreamdat_Parameter SPECNUMBER
+syn keyword upstreamdat_Parameter SPECTYPE
+syn keyword upstreamdat_Parameter SPECTYPE
+syn keyword upstreamdat_Parameter STARTTIME
+syn keyword upstreamdat_Parameter STORAGETYPE
+syn keyword upstreamdat_Parameter SUBDIRECTORIES
+syn keyword upstreamdat_Parameter SUBDIRECTORIES
+syn keyword upstreamdat_Parameter SWITCHTOTAPEMB
+syn keyword upstreamdat_Parameter TCPADDRESS
+syn keyword upstreamdat_Parameter TCPTIMEOUT
+syn keyword upstreamdat_Parameter TIMEOVERRIDE
+syn keyword upstreamdat_Parameter TRACE
+syn keyword upstreamdat_Parameter TRANSLATE
+syn keyword upstreamdat_Parameter ULTRACOMP
+syn keyword upstreamdat_Parameter ULTREG
+syn keyword upstreamdat_Parameter ULTUPD
+syn keyword upstreamdat_Parameter UNCMACHINEALIAS
+syn keyword upstreamdat_Parameter UNCMACHINEALIAS
+syn keyword upstreamdat_Parameter USEALEBRA
+syn keyword upstreamdat_Parameter USECONTROLFILE
+syn keyword upstreamdat_Parameter USEGID
+syn keyword upstreamdat_Parameter USERID
+syn keyword upstreamdat_Parameter USEUID
+syn keyword upstreamdat_Parameter USNOUIDGIDERRORS
+syn keyword upstreamdat_Parameter UTF8
+syn keyword upstreamdat_Parameter VAULTNUMBER
+syn keyword upstreamdat_Parameter VERSIONDATE
+syn keyword upstreamdat_Parameter WRITESPARSE
+syn keyword upstreamdat_Parameter XFERECORDSIZE
+syn keyword upstreamdat_Parameter XFERRECSEP
+syn keyword upstreamdat_Parameter XFERRECUSECR
+
+" File Specs:
+syn match upstreamdat_Filespec /file spec\c \d\{1,3}.*/
+
+" Comments:
+syn match upstreamdat_Comment /^#.*/
+
+" List Of Parameters:
+syn region upstreamdat_Parms start="Current Parameters:" end="End Of Parameters" transparent fold
+
+hi def link upstreamdat_Parameter Type
+"hi def link upstreamdat_Filespec Underlined
+hi def link upstreamdat_Comment Comment
+
+let b:current_syntax = "upstreamdat"
diff --git a/runtime/syntax/usw2kagtlog.vim b/runtime/syntax/usw2kagtlog.vim
index 0a34128f9b..a112340d12 100644
--- a/runtime/syntax/usw2kagtlog.vim
+++ b/runtime/syntax/usw2kagtlog.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: Innovation Data Processing USW2KAgt.log file
" Maintainer: Rob Owens <rowens@fdrinnovation.com>
-" Latest Revision: 2013-09-19
+" Latest Revision: 2014-04-01
" Quit when a syntax file was already loaded
if exists("b:current_syntax")
@@ -17,8 +17,12 @@ syn match usw2kagtlog_MsgI /Msg #\(Agt\|PC\|Srv\)\d\{4,5}I/ nextgroup=usw2kagtlo
syn match usw2kagtlog_MsgW /Msg #\(Agt\|PC\|Srv\)\d\{4,5}W/ nextgroup=usw2kagtlog_Process skipwhite
" Processes:
syn region usw2kagtlog_Process start="(" end=")" contained
-syn region usw2kagtlog_Process start="Starting the processing for a \zs\"" end="\ze client request"
-syn region usw2kagtlog_Process start="Ending the processing for a \zs\"" end="\ze client request"
+"syn region usw2kagtlog_Process start="Starting the processing for a \zs\"" end="\ze client request"
+"syn region usw2kagtlog_Process start="Ending the processing for a \zs\"" end="\ze client request"
+"syn region usw2kagtlog_Process start="Starting the processing for a \zs\"" end="\ze client\s\{0,1}\r\{0,1}\s\{1,9}request"
+"syn region usw2kagtlog_Process start="Ending the processing for a \zs\"" end="\ze client\s\{0,1}\r\{0,1}\s\{1,9}request"
+syn region usw2kagtlog_Process start="Starting the processing for a \zs\"" end="\ze client"
+syn region usw2kagtlog_Process start="Ending the processing for a \zs\"" end="\ze client"
" IP Address:
syn match usw2kagtlog_IPaddr / \d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}/
" Profile:
diff --git a/runtime/syntax/yaml.vim b/runtime/syntax/yaml.vim
index 073dbf7418..626dc8a77f 100644
--- a/runtime/syntax/yaml.vim
+++ b/runtime/syntax/yaml.vim
@@ -2,7 +2,7 @@
" Language: YAML (YAML Ain't Markup Language) 1.2
" Maintainer: Nikolai Pavlov <zyx.vim@gmail.com>
" First author: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2010-10-08
+" Latest Revision: 2015-03-28
if exists('b:current_syntax')
finish
@@ -11,13 +11,40 @@ endif
let s:cpo_save = &cpo
set cpo&vim
-let s:ns_char = '\%(\%([\n\r\uFEFF \t]\)\@!\p\)'
-let s:ns_word_char = '\%(\w\|-\)'
-let s:ns_uri_char = '\%(%\x\x\|'.s:ns_word_char.'\|[#/;?:@&=+$,.!~*''()\[\]]\)'
+" Choose the schema to use
+" TODO: Validate schema
+if !exists('b:yaml_schema')
+ if exists('g:yaml_schema')
+ let b:yaml_schema = g:yaml_schema
+ else
+ let b:yaml_schema = 'core'
+ endif
+endif
+
+let s:ns_char = '\%([\n\r\uFEFF \t]\@!\p\)'
+let s:ns_word_char = '[[:alnum:]_\-]'
+let s:ns_uri_char = '\%(%\x\x\|'.s:ns_word_char.'\|[#/;?:@&=+$,.!~*''()[\]]\)'
let s:ns_tag_char = '\%(%\x\x\|'.s:ns_word_char.'\|[#/;?:@&=+$.~*''()]\)'
-let s:c_ns_anchor_char = '\%(\%([\n\r\uFEFF \t,\[\]{}]\)\@!\p\)'
-let s:c_indicator = '[\-?:,\[\]{}#&*!|>''"%@`]'
-let s:c_flow_indicator = '[,\[\]{}]'
+let s:c_ns_anchor_char = '\%([\n\r\uFEFF \t,[\]{}]\@!\p\)'
+let s:c_indicator = '[\-?:,[\]{}#&*!|>''"%@`]'
+let s:c_flow_indicator = '[,[\]{}]'
+
+let s:ns_char_without_c_indicator = substitute(s:ns_char, '\v\C[\zs', '\=s:c_indicator[1:-2]', '')
+
+let s:_collection = '[^\@!\(\%(\\\.\|\[^\\\]]\)\+\)]'
+let s:_neg_collection = '[^\(\%(\\\.\|\[^\\\]]\)\+\)]'
+function s:SimplifyToAssumeAllPrintable(p)
+ return substitute(a:p, '\V\C\\%('.s:_collection.'\\@!\\p\\)', '[^\1]', '')
+endfunction
+let s:ns_char = s:SimplifyToAssumeAllPrintable(s:ns_char)
+let s:ns_char_without_c_indicator = s:SimplifyToAssumeAllPrintable(s:ns_char_without_c_indicator)
+let s:c_ns_anchor_char = s:SimplifyToAssumeAllPrintable(s:c_ns_anchor_char)
+
+function s:SimplifyAdjacentCollections(p)
+ return substitute(a:p, '\V\C'.s:_collection.'\\|'.s:_collection, '[\1\2]', 'g')
+endfunction
+let s:ns_uri_char = s:SimplifyAdjacentCollections(s:ns_uri_char)
+let s:ns_tag_char = s:SimplifyAdjacentCollections(s:ns_tag_char)
let s:c_verbatim_tag = '!<'.s:ns_uri_char.'\+>'
let s:c_named_tag_handle = '!'.s:ns_word_char.'\+!'
@@ -46,11 +73,15 @@ let s:ns_tag_prefix = s:ns_local_tag_prefix.
let s:ns_plain_safe_out = s:ns_char
let s:ns_plain_safe_in = '\%('.s:c_flow_indicator.'\@!'.s:ns_char.'\)'
-let s:ns_plain_first_in = '\%('.s:c_indicator.'\@!'.s:ns_char.'\|[?:\-]\%('.s:ns_plain_safe_in.'\)\@=\)'
-let s:ns_plain_first_out = '\%('.s:c_indicator.'\@!'.s:ns_char.'\|[?:\-]\%('.s:ns_plain_safe_out.'\)\@=\)'
+let s:ns_plain_safe_in = substitute(s:ns_plain_safe_in, '\V\C\\%('.s:_collection.'\\@!'.s:_neg_collection.'\\)', '[^\1\2]', '')
+let s:ns_plain_safe_in_without_colhash = substitute(s:ns_plain_safe_in, '\V\C'.s:_neg_collection, '[^\1:#]', '')
+let s:ns_plain_safe_out_without_colhash = substitute(s:ns_plain_safe_out, '\V\C'.s:_neg_collection, '[^\1:#]', '')
-let s:ns_plain_char_in = '\%('.s:ns_char.'#\|:'.s:ns_plain_safe_in.'\|[:#]\@!'.s:ns_plain_safe_in.'\)'
-let s:ns_plain_char_out = '\%('.s:ns_char.'#\|:'.s:ns_plain_safe_out.'\|[:#]\@!'.s:ns_plain_safe_out.'\)'
+let s:ns_plain_first_in = '\%('.s:ns_char_without_c_indicator.'\|[?:\-]\%('.s:ns_plain_safe_in.'\)\@=\)'
+let s:ns_plain_first_out = '\%('.s:ns_char_without_c_indicator.'\|[?:\-]\%('.s:ns_plain_safe_out.'\)\@=\)'
+
+let s:ns_plain_char_in = '\%('.s:ns_char.'#\|:'.s:ns_plain_safe_in.'\|'.s:ns_plain_safe_in_without_colhash.'\)'
+let s:ns_plain_char_out = '\%('.s:ns_char.'#\|:'.s:ns_plain_safe_out.'\|'.s:ns_plain_safe_out_without_colhash.'\)'
let s:ns_plain_out = s:ns_plain_first_out . s:ns_plain_char_out.'*'
let s:ns_plain_in = s:ns_plain_first_in . s:ns_plain_char_in.'*'
@@ -89,9 +120,11 @@ syn match yamlSingleEscape contained "''"
syn match yamlBlockScalarHeader contained '\s\+\zs[|>]\%([+-]\=[1-9]\|[1-9]\=[+-]\)\='
+syn cluster yamlConstant contains=yamlBool,yamlNull
+
syn cluster yamlFlow contains=yamlFlowString,yamlFlowMapping,yamlFlowCollection
syn cluster yamlFlow add=yamlFlowMappingKey,yamlFlowMappingMerge
-syn cluster yamlFlow add=yamlConstant,yamlPlainScalar,yamlFloat
+syn cluster yamlFlow add=@yamlConstant,yamlPlainScalar,yamlFloat
syn cluster yamlFlow add=yamlTimestamp,yamlInteger,yamlMappingKeyStart
syn cluster yamlFlow add=yamlComment
syn region yamlFlowMapping matchgroup=yamlFlowIndicator start='{' end='}' contains=@yamlFlow
@@ -103,15 +136,15 @@ execute 'syn match yamlPlainScalar contained /'.s:ns_plain_in.'/'
syn match yamlMappingKeyStart '?\ze\s'
syn match yamlMappingKeyStart '?' contained
-execute 'syn match yamlFlowMappingKey /'.s:ns_plain_in.'\ze\s*:/ contained '.
+execute 'syn match yamlFlowMappingKey /\%#=1'.s:ns_plain_in.'\%(\s\+'.s:ns_plain_in.'\)*\ze\s*:/ contained '.
\'nextgroup=yamlKeyValueDelimiter'
syn match yamlFlowMappingMerge /<<\ze\s*:/ contained nextgroup=yamlKeyValueDelimiter
syn match yamlBlockCollectionItemStart '^\s*\zs-\%(\s\+-\)*\s' nextgroup=yamlBlockMappingKey,yamlBlockMappingMerge
" Use the old regexp engine, the NFA engine doesn't like all the \@ items.
-execute 'syn match yamlBlockMappingKey /\%#=1^\s*\zs'.s:ns_plain_out.'\ze\s*:\%(\s\|$\)/ '.
+execute 'syn match yamlBlockMappingKey /\%#=1^\s*\zs'.s:ns_plain_out.'\%(\s\+'.s:ns_plain_out.'\)*\ze\s*:\%(\s\|$\)/ '.
\'nextgroup=yamlKeyValueDelimiter'
-execute 'syn match yamlBlockMappingKey /\%#=1\s*\zs'.s:ns_plain_out.'\ze\s*:\%(\s\|$\)/ contained '.
+execute 'syn match yamlBlockMappingKey /\%#=1\s*\zs'.s:ns_plain_out.'\%(\s\+'.s:ns_plain_out.'\)*\ze\s*:\%(\s\|$\)/ contained '.
\'nextgroup=yamlKeyValueDelimiter'
syn match yamlBlockMappingMerge /^\s*\zs<<\ze:\%(\s\|$\)/ nextgroup=yamlKeyValueDelimiter
syn match yamlBlockMappingMerge /<<\ze\s*:\%(\s\|$\)/ nextgroup=yamlKeyValueDelimiter contained
@@ -119,14 +152,32 @@ syn match yamlBlockMappingMerge /<<\ze\s*:\%(\s\|$\)/ nextgroup=yamlKeyValueDeli
syn match yamlKeyValueDelimiter /\s*:/ contained
syn match yamlKeyValueDelimiter /\s*:/ contained
-syn keyword yamlConstant true True TRUE false False FALSE
-syn keyword yamlConstant null Null NULL
-syn match yamlConstant '\<\~\>'
-
-syn match yamlTimestamp /\%([\[\]{}, \t]\@!\p\)\@<!\%(\d\{4}-\d\d\=-\d\d\=\%(\%([Tt]\|\s\+\)\%(\d\d\=\):\%(\d\d\):\%(\d\d\)\%(\.\%(\d*\)\)\=\%(\s*\%(Z\|[+-]\d\d\=\%(:\d\d\)\=\)\)\=\)\=\)\%([\[\]{}, \t]\@!\p\)\@!/
+syn cluster yamlScalarWithSpecials contains=yamlPlainScalar,yamlBlockMappingKey,yamlFlowMappingKey
+
+let s:_bounder = s:SimplifyToAssumeAllPrintable('\%([[\]{}, \t]\@!\p\)')
+if b:yaml_schema is# 'json'
+ syn keyword yamlNull null contained containedin=@yamlScalarWithSpecials
+ syn keyword yamlBool true false
+ exe 'syn match yamlInteger /'.s:_bounder.'\@1<!\%(0\|-\=[1-9][0-9]*\)'.s:_bounder.'\@!/ contained containedin=@yamlScalarWithSpecials'
+ exe 'syn match yamlFloat /'.s:_bounder.'\@1<!\%(-\=[1-9][0-9]*\%(\.[0-9]*\)\=\(e[-+]\=[0-9]\+\)\=\|0\|-\=\.inf\|\.nan\)'.s:_bounder.'\@!/ contained containedin=@yamlScalarWithSpecials'
+elseif b:yaml_schema is# 'core'
+ syn keyword yamlNull null Null NULL contained containedin=@yamlScalarWithSpecials
+ syn keyword yamlBool true True TRUE false False FALSE contained containedin=@yamlScalarWithSpecials
+ exe 'syn match yamlNull /'.s:_bounder.'\@1<!\~'.s:_bounder.'\@!/ contained containedin=@yamlScalarWithSpecials'
+ exe 'syn match yamlInteger /'.s:_bounder.'\@1<!\%([+-]\=\%(0\%(b[0-1_]\+\|[0-7_]\+\|x[0-9a-fA-F_]\+\)\=\|\%([1-9][0-9_]*\%(:[0-5]\=\d\)\+\)\)\|[1-9][0-9_]*\)'.s:_bounder.'\@!/ contained containedin=@yamlScalarWithSpecials'
+ exe 'syn match yamlFloat /'.s:_bounder.'\@1<!\%([+-]\=\%(\%(\d[0-9_]*\)\.[0-9_]*\%([eE][+-]\=\d\+\)\=\|\.[0-9_]\+\%([eE][-+]\=[0-9]\+\)\=\|\d[0-9_]*\%(:[0-5]\=\d\)\+\.[0-9_]*\|\.\%(inf\|Inf\|INF\)\)\|\%(\.\%(nan\|NaN\|NAN\)\)\)'.s:_bounder.'\@!/ contained containedin=@yamlScalarWithSpecials'
+elseif b:yaml_schema is# 'pyyaml'
+ syn keyword yamlNull null Null NULL contained containedin=@yamlScalarWithSpecials
+ syn keyword yamlBool true True TRUE false False FALSE yes Yes YES no No NO on On ON off Off OFF contained containedin=@yamlScalarWithSpecials
+ exe 'syn match yamlNull /'.s:_bounder.'\@1<!\~'.s:_bounder.'\@!/ contained containedin=@yamlScalarWithSpecials'
+ exe 'syn match yamlFloat /'.s:_bounder.'\@1<!\%(\v[-+]?%(\d[0-9_]*)\.[0-9_]*%([eE][-+]\d+)?|\.[0-9_]+%([eE][-+]\d+)?|[-+]?\d[0-9_]*%(\:[0-5]?\d)+\.[0-9_]*|[-+]?\.%(inf|Inf|INF)|\.%(nan|NaN|NAN)\m\)'.s:_bounder.'\@!/ contained containedin=@yamlScalarWithSpecials'
+ exe 'syn match yamlInteger /'.s:_bounder.'\@1<!\%(\v[-+]?0b[0-1_]+|[-+]?0[0-7_]+|[-+]?%(0|[1-9][0-9_]*)|[-+]?0x[0-9a-fA-F_]+|[-+]?[1-9][0-9_]*%(:[0-5]?\d)+\m\)'.s:_bounder.'\@!/ contained containedin=@yamlScalarWithSpecials'
+ exe 'syn match yamlTimestamp /'.s:_bounder.'\@1<!\%(\v\d\d\d\d\-\d\d\-\d\d|\d\d\d\d \-\d\d? \-\d\d?%([Tt]|[ \t]+)\d\d?\:\d\d \:\d\d %(\.\d*)?%([ \t]*%(Z|[-+]\d\d?%(\:\d\d)?))?\m\)'.s:_bounder.'\@!/ contained containedin=@yamlScalarWithSpecials'
+elseif b:yaml_schema is# 'failsafe'
+ " Nothing
+endif
+unlet s:_bounder
-syn match yamlInteger /\%([\[\]{}, \t]\@!\p\)\@<!\%([+-]\=\%(0\%(b[0-1_]\+\|[0-7_]\+\|x[0-9a-fA-F_]\+\)\=\|\%([1-9][0-9_]*\%(:[0-5]\=\d\)\+\)\)\|[1-9][0-9_]*\)\%([\[\]{}, \t]\@!\p\)\@!/
-syn match yamlFloat /\%([\[\]{}, \t]\@!\p\)\@<!\%([+-]\=\%(\%(\d[0-9_]*\)\.[0-9_]*\%([eE][+-]\d\+\)\=\|\.[0-9_]\+\%([eE][-+][0-9]\+\)\=\|\d[0-9_]*\%(:[0-5]\=\d\)\+\.[0-9_]*\|\.\%(inf\|Inf\|INF\)\)\|\%(\.\%(nan\|NaN\|NAN\)\)\)\%([\[\]{}, \t]\@!\p\)\@!/
execute 'syn match yamlNodeTag '.string(s:c_ns_tag_property)
execute 'syn match yamlAnchor '.string(s:c_ns_anchor_property)
@@ -170,6 +221,9 @@ hi def link yamlKeyValueDelimiter Special
hi def link yamlConstant Constant
+hi def link yamlNull yamlConstant
+hi def link yamlBool yamlConstant
+
hi def link yamlAnchor Type
hi def link yamlAlias Type
hi def link yamlNodeTag Type
@@ -180,8 +234,10 @@ hi def link yamlTimestamp Number
let b:current_syntax = "yaml"
-unlet s:ns_word_char s:ns_uri_char s:c_verbatim_tag s:c_named_tag_handle s:c_secondary_tag_handle s:c_primary_tag_handle s:c_tag_handle s:ns_tag_char s:c_ns_shorthand_tag s:c_non_specific_tag s:c_ns_tag_property s:c_ns_anchor_char s:c_ns_anchor_name s:c_ns_anchor_property s:c_ns_alias_node s:ns_char s:ns_directive_name s:ns_local_tag_prefix s:ns_global_tag_prefix s:ns_tag_prefix s:c_indicator s:ns_plain_safe_out s:c_flow_indicator s:ns_plain_safe_in s:ns_plain_first_in s:ns_plain_first_out s:ns_plain_char_in s:ns_plain_char_out s:ns_plain_out s:ns_plain_in
+unlet s:ns_word_char s:ns_uri_char s:c_verbatim_tag s:c_named_tag_handle s:c_secondary_tag_handle s:c_primary_tag_handle s:c_tag_handle s:ns_tag_char s:c_ns_shorthand_tag s:c_non_specific_tag s:c_ns_tag_property s:c_ns_anchor_char s:c_ns_anchor_name s:c_ns_anchor_property s:c_ns_alias_node s:ns_char s:ns_directive_name s:ns_local_tag_prefix s:ns_global_tag_prefix s:ns_tag_prefix s:c_indicator s:ns_plain_safe_out s:c_flow_indicator s:ns_plain_safe_in s:ns_plain_first_in s:ns_plain_first_out s:ns_plain_char_in s:ns_plain_char_out s:ns_plain_out s:ns_plain_in s:ns_char_without_c_indicator s:ns_plain_safe_in_without_colhash s:ns_plain_safe_out_without_colhash
+unlet s:_collection s:_neg_collection
+delfunction s:SimplifyAdjacentCollections
+delfunction s:SimplifyToAssumeAllPrintable
let &cpo = s:cpo_save
unlet s:cpo_save
-
diff --git a/runtime/vimrc_example.vim b/runtime/vimrc_example.vim
index 97f646b91a..48c7a3535a 100644
--- a/runtime/vimrc_example.vim
+++ b/runtime/vimrc_example.vim
@@ -34,10 +34,8 @@ augroup vimrcEx
" When editing a file, always jump to the last known cursor position.
" Don't do it when the position is invalid or when inside an event handler
- " Also don't do it when the mark is in the first line, that is the default
- " position when opening a file.
autocmd BufReadPost *
- \ if line("'\"") > 1 && line("'\"") <= line("$") |
+ \ if line("'\"") >= 1 && line("'\"") <= line("$") |
\ execute "normal! g`\"" |
\ endif
diff --git a/src/nvim/path.c b/src/nvim/path.c
index 5ac3d07f67..8b9a49dfc0 100644
--- a/src/nvim/path.c
+++ b/src/nvim/path.c
@@ -681,11 +681,16 @@ static size_t do_path_expand(garray_T *gap, const char_u *path,
/* remove backslashes for the remaining components only */
(void)do_path_expand(gap, buf, len + 1, flags, false);
} else {
- /* no more wildcards, check if there is a match */
- /* remove backslashes for the remaining components only */
- if (*path_end != NUL)
+ FileInfo file_info;
+
+ // no more wildcards, check if there is a match
+ // remove backslashes for the remaining components only
+ if (*path_end != NUL) {
backslash_halve(buf + len + 1);
- if (os_file_exists(buf)) { /* add existing file */
+ }
+ // add existing file or symbolic link
+ if ((flags & EW_ALLLINKS) ? os_fileinfo_link((char *)buf, &file_info)
+ : os_file_exists(buf)) {
addfile(gap, buf, flags);
}
}
@@ -1294,26 +1299,28 @@ expand_backtick (
return cnt;
}
-/*
- * Add a file to a file list. Accepted flags:
- * EW_DIR add directories
- * EW_FILE add files
- * EW_EXEC add executable files
- * EW_NOTFOUND add even when it doesn't exist
- * EW_ADDSLASH add slash after directory name
- */
-void
-addfile (
+// Add a file to a file list. Accepted flags:
+// EW_DIR add directories
+// EW_FILE add files
+// EW_EXEC add executable files
+// EW_NOTFOUND add even when it doesn't exist
+// EW_ADDSLASH add slash after directory name
+// EW_ALLLINKS add symlink also when the referred file does not exist
+void addfile(
garray_T *gap,
char_u *f, /* filename */
int flags
)
{
bool isdir;
+ FileInfo file_info;
- /* if the file/dir doesn't exist, may not add it */
- if (!(flags & EW_NOTFOUND) && !os_file_exists(f))
+ // if the file/dir/link doesn't exist, may not add it
+ if (!(flags & EW_NOTFOUND) &&
+ ((flags & EW_ALLLINKS) ?
+ !os_fileinfo_link((char *)f, &file_info) : !os_file_exists(f))) {
return;
+ }
#ifdef FNAME_ILLEGAL
/* if the file/dir contains illegal characters, don't add it */
diff --git a/src/nvim/regexp.c b/src/nvim/regexp.c
index e01e812a70..608aa38466 100644
--- a/src/nvim/regexp.c
+++ b/src/nvim/regexp.c
@@ -796,13 +796,14 @@ static void reg_equi_class(int c)
if (enc_utf8 || STRCMP(p_enc, "latin1") == 0
|| STRCMP(p_enc, "iso-8859-15") == 0) {
switch (c) {
- case 'A': case '\300': case '\301': case '\302':
+ // Do not use '\300' style, it results in a negative number.
+ case 'A': case 0xc0: case 0xc1: case 0xc2:
+ case 0xc3: case 0xc4: case 0xc5:
CASEMBC(0x100) CASEMBC(0x102) CASEMBC(0x104) CASEMBC(0x1cd)
CASEMBC(0x1de) CASEMBC(0x1e0) CASEMBC(0x1ea2)
- case '\303': case '\304': case '\305':
- regmbc('A'); regmbc('\300'); regmbc('\301');
- regmbc('\302'); regmbc('\303'); regmbc('\304');
- regmbc('\305');
+ regmbc('A'); regmbc(0xc0); regmbc(0xc1);
+ regmbc(0xc2); regmbc(0xc3); regmbc(0xc4);
+ regmbc(0xc5);
REGMBC(0x100) REGMBC(0x102) REGMBC(0x104)
REGMBC(0x1cd) REGMBC(0x1de) REGMBC(0x1e0)
REGMBC(0x1ea2)
@@ -810,9 +811,9 @@ static void reg_equi_class(int c)
case 'B': CASEMBC(0x1e02) CASEMBC(0x1e06)
regmbc('B'); REGMBC(0x1e02) REGMBC(0x1e06)
return;
- case 'C': case '\307':
+ case 'C': case 0xc7:
CASEMBC(0x106) CASEMBC(0x108) CASEMBC(0x10a) CASEMBC(0x10c)
- regmbc('C'); regmbc('\307');
+ regmbc('C'); regmbc(0xc7);
REGMBC(0x106) REGMBC(0x108) REGMBC(0x10a)
REGMBC(0x10c)
return;
@@ -821,11 +822,11 @@ static void reg_equi_class(int c)
regmbc('D'); REGMBC(0x10e) REGMBC(0x110)
REGMBC(0x1e0a) REGMBC(0x1e0e) REGMBC(0x1e10)
return;
- case 'E': case '\310': case '\311': case '\312': case '\313':
+ case 'E': case 0xc8: case 0xc9: case 0xca: case 0xcb:
CASEMBC(0x112) CASEMBC(0x114) CASEMBC(0x116) CASEMBC(0x118)
CASEMBC(0x11a) CASEMBC(0x1eba) CASEMBC(0x1ebc)
- regmbc('E'); regmbc('\310'); regmbc('\311');
- regmbc('\312'); regmbc('\313');
+ regmbc('E'); regmbc(0xc8); regmbc(0xc9);
+ regmbc(0xca); regmbc(0xcb);
REGMBC(0x112) REGMBC(0x114) REGMBC(0x116)
REGMBC(0x118) REGMBC(0x11a) REGMBC(0x1eba)
REGMBC(0x1ebc)
@@ -845,11 +846,11 @@ static void reg_equi_class(int c)
regmbc('H'); REGMBC(0x124) REGMBC(0x126)
REGMBC(0x1e22) REGMBC(0x1e26) REGMBC(0x1e28)
return;
- case 'I': case '\314': case '\315': case '\316': case '\317':
+ case 'I': case 0xcc: case 0xcd: case 0xce: case 0xcf:
CASEMBC(0x128) CASEMBC(0x12a) CASEMBC(0x12c) CASEMBC(0x12e)
CASEMBC(0x130) CASEMBC(0x1cf) CASEMBC(0x1ec8)
- regmbc('I'); regmbc('\314'); regmbc('\315');
- regmbc('\316'); regmbc('\317');
+ regmbc('I'); regmbc(0xcc); regmbc(0xcd);
+ regmbc(0xce); regmbc(0xcf);
REGMBC(0x128) REGMBC(0x12a) REGMBC(0x12c)
REGMBC(0x12e) REGMBC(0x130) REGMBC(0x1cf)
REGMBC(0x1ec8)
@@ -871,20 +872,20 @@ static void reg_equi_class(int c)
case 'M': CASEMBC(0x1e3e) CASEMBC(0x1e40)
regmbc('M'); REGMBC(0x1e3e) REGMBC(0x1e40)
return;
- case 'N': case '\321':
+ case 'N': case 0xd1:
CASEMBC(0x143) CASEMBC(0x145) CASEMBC(0x147) CASEMBC(0x1e44)
CASEMBC(0x1e48)
- regmbc('N'); regmbc('\321');
+ regmbc('N'); regmbc(0xd1);
REGMBC(0x143) REGMBC(0x145) REGMBC(0x147)
REGMBC(0x1e44) REGMBC(0x1e48)
return;
- case 'O': case '\322': case '\323': case '\324': case '\325':
- case '\326': case '\330':
+ case 'O': case 0xd2: case 0xd3: case 0xd4: case 0xd5:
+ case 0xd6: case 0xd8:
CASEMBC(0x14c) CASEMBC(0x14e) CASEMBC(0x150) CASEMBC(0x1a0)
CASEMBC(0x1d1) CASEMBC(0x1ea) CASEMBC(0x1ec) CASEMBC(0x1ece)
- regmbc('O'); regmbc('\322'); regmbc('\323');
- regmbc('\324'); regmbc('\325'); regmbc('\326');
- regmbc('\330');
+ regmbc('O'); regmbc(0xd2); regmbc(0xd3);
+ regmbc(0xd4); regmbc(0xd5); regmbc(0xd6);
+ regmbc(0xd8);
REGMBC(0x14c) REGMBC(0x14e) REGMBC(0x150)
REGMBC(0x1a0) REGMBC(0x1d1) REGMBC(0x1ea)
REGMBC(0x1ec) REGMBC(0x1ece)
@@ -907,12 +908,12 @@ static void reg_equi_class(int c)
regmbc('T'); REGMBC(0x162) REGMBC(0x164)
REGMBC(0x166) REGMBC(0x1e6a) REGMBC(0x1e6e)
return;
- case 'U': case '\331': case '\332': case '\333': case '\334':
+ case 'U': case 0xd9: case 0xda: case 0xdb: case 0xdc:
CASEMBC(0x168) CASEMBC(0x16a) CASEMBC(0x16c) CASEMBC(0x16e)
CASEMBC(0x170) CASEMBC(0x172) CASEMBC(0x1af) CASEMBC(0x1d3)
CASEMBC(0x1ee6)
- regmbc('U'); regmbc('\331'); regmbc('\332');
- regmbc('\333'); regmbc('\334');
+ regmbc('U'); regmbc(0xd9); regmbc(0xda);
+ regmbc(0xdb); regmbc(0xdc);
REGMBC(0x168) REGMBC(0x16a) REGMBC(0x16c)
REGMBC(0x16e) REGMBC(0x170) REGMBC(0x172)
REGMBC(0x1af) REGMBC(0x1d3) REGMBC(0x1ee6)
@@ -928,10 +929,10 @@ static void reg_equi_class(int c)
case 'X': CASEMBC(0x1e8a) CASEMBC(0x1e8c)
regmbc('X'); REGMBC(0x1e8a) REGMBC(0x1e8c)
return;
- case 'Y': case '\335':
+ case 'Y': case 0xdd:
CASEMBC(0x176) CASEMBC(0x178) CASEMBC(0x1e8e) CASEMBC(0x1ef2)
CASEMBC(0x1ef6) CASEMBC(0x1ef8)
- regmbc('Y'); regmbc('\335');
+ regmbc('Y'); regmbc(0xdd);
REGMBC(0x176) REGMBC(0x178) REGMBC(0x1e8e)
REGMBC(0x1ef2) REGMBC(0x1ef6) REGMBC(0x1ef8)
return;
@@ -941,13 +942,13 @@ static void reg_equi_class(int c)
REGMBC(0x17d) REGMBC(0x1b5) REGMBC(0x1e90)
REGMBC(0x1e94)
return;
- case 'a': case '\340': case '\341': case '\342':
- case '\343': case '\344': case '\345':
+ case 'a': case 0xe0: case 0xe1: case 0xe2:
+ case 0xe3: case 0xe4: case 0xe5:
CASEMBC(0x101) CASEMBC(0x103) CASEMBC(0x105) CASEMBC(0x1ce)
CASEMBC(0x1df) CASEMBC(0x1e1) CASEMBC(0x1ea3)
- regmbc('a'); regmbc('\340'); regmbc('\341');
- regmbc('\342'); regmbc('\343'); regmbc('\344');
- regmbc('\345');
+ regmbc('a'); regmbc(0xe0); regmbc(0xe1);
+ regmbc(0xe2); regmbc(0xe3); regmbc(0xe4);
+ regmbc(0xe5);
REGMBC(0x101) REGMBC(0x103) REGMBC(0x105)
REGMBC(0x1ce) REGMBC(0x1df) REGMBC(0x1e1)
REGMBC(0x1ea3)
@@ -955,9 +956,9 @@ static void reg_equi_class(int c)
case 'b': CASEMBC(0x1e03) CASEMBC(0x1e07)
regmbc('b'); REGMBC(0x1e03) REGMBC(0x1e07)
return;
- case 'c': case '\347':
+ case 'c': case 0xe7:
CASEMBC(0x107) CASEMBC(0x109) CASEMBC(0x10b) CASEMBC(0x10d)
- regmbc('c'); regmbc('\347');
+ regmbc('c'); regmbc(0xe7);
REGMBC(0x107) REGMBC(0x109) REGMBC(0x10b)
REGMBC(0x10d)
return;
@@ -966,11 +967,11 @@ static void reg_equi_class(int c)
regmbc('d'); REGMBC(0x10f) REGMBC(0x111)
REGMBC(0x1e0b) REGMBC(0x1e0f) REGMBC(0x1e11)
return;
- case 'e': case '\350': case '\351': case '\352': case '\353':
+ case 'e': case 0xe8: case 0xe9: case 0xea: case 0xeb:
CASEMBC(0x113) CASEMBC(0x115) CASEMBC(0x117) CASEMBC(0x119)
CASEMBC(0x11b) CASEMBC(0x1ebb) CASEMBC(0x1ebd)
- regmbc('e'); regmbc('\350'); regmbc('\351');
- regmbc('\352'); regmbc('\353');
+ regmbc('e'); regmbc(0xe8); regmbc(0xe9);
+ regmbc(0xea); regmbc(0xeb);
REGMBC(0x113) REGMBC(0x115) REGMBC(0x117)
REGMBC(0x119) REGMBC(0x11b) REGMBC(0x1ebb)
REGMBC(0x1ebd)
@@ -991,11 +992,11 @@ static void reg_equi_class(int c)
REGMBC(0x1e23) REGMBC(0x1e27) REGMBC(0x1e29)
REGMBC(0x1e96)
return;
- case 'i': case '\354': case '\355': case '\356': case '\357':
+ case 'i': case 0xec: case 0xed: case 0xee: case 0xef:
CASEMBC(0x129) CASEMBC(0x12b) CASEMBC(0x12d) CASEMBC(0x12f)
CASEMBC(0x1d0) CASEMBC(0x1ec9)
- regmbc('i'); regmbc('\354'); regmbc('\355');
- regmbc('\356'); regmbc('\357');
+ regmbc('i'); regmbc(0xec); regmbc(0xed);
+ regmbc(0xee); regmbc(0xef);
REGMBC(0x129) REGMBC(0x12b) REGMBC(0x12d)
REGMBC(0x12f) REGMBC(0x1d0) REGMBC(0x1ec9)
return;
@@ -1016,20 +1017,20 @@ static void reg_equi_class(int c)
case 'm': CASEMBC(0x1e3f) CASEMBC(0x1e41)
regmbc('m'); REGMBC(0x1e3f) REGMBC(0x1e41)
return;
- case 'n': case '\361':
+ case 'n': case 0xf1:
CASEMBC(0x144) CASEMBC(0x146) CASEMBC(0x148) CASEMBC(0x149)
CASEMBC(0x1e45) CASEMBC(0x1e49)
- regmbc('n'); regmbc('\361');
+ regmbc('n'); regmbc(0xf1);
REGMBC(0x144) REGMBC(0x146) REGMBC(0x148)
REGMBC(0x149) REGMBC(0x1e45) REGMBC(0x1e49)
return;
- case 'o': case '\362': case '\363': case '\364': case '\365':
- case '\366': case '\370':
+ case 'o': case 0xf2: case 0xf3: case 0xf4: case 0xf5:
+ case 0xf6: case 0xf8:
CASEMBC(0x14d) CASEMBC(0x14f) CASEMBC(0x151) CASEMBC(0x1a1)
CASEMBC(0x1d2) CASEMBC(0x1eb) CASEMBC(0x1ed) CASEMBC(0x1ecf)
- regmbc('o'); regmbc('\362'); regmbc('\363');
- regmbc('\364'); regmbc('\365'); regmbc('\366');
- regmbc('\370');
+ regmbc('o'); regmbc(0xf2); regmbc(0xf3);
+ regmbc(0xf4); regmbc(0xf5); regmbc(0xf6);
+ regmbc(0xf8);
REGMBC(0x14d) REGMBC(0x14f) REGMBC(0x151)
REGMBC(0x1a1) REGMBC(0x1d2) REGMBC(0x1eb)
REGMBC(0x1ed) REGMBC(0x1ecf)
@@ -1052,12 +1053,12 @@ static void reg_equi_class(int c)
regmbc('t'); REGMBC(0x163) REGMBC(0x165) REGMBC(0x167)
REGMBC(0x1e6b) REGMBC(0x1e6f) REGMBC(0x1e97)
return;
- case 'u': case '\371': case '\372': case '\373': case '\374':
+ case 'u': case 0xf9: case 0xfa: case 0xfb: case 0xfc:
CASEMBC(0x169) CASEMBC(0x16b) CASEMBC(0x16d) CASEMBC(0x16f)
CASEMBC(0x171) CASEMBC(0x173) CASEMBC(0x1b0) CASEMBC(0x1d4)
CASEMBC(0x1ee7)
- regmbc('u'); regmbc('\371'); regmbc('\372');
- regmbc('\373'); regmbc('\374');
+ regmbc('u'); regmbc(0xf9); regmbc(0xfa);
+ regmbc(0xfb); regmbc(0xfc);
REGMBC(0x169) REGMBC(0x16b) REGMBC(0x16d)
REGMBC(0x16f) REGMBC(0x171) REGMBC(0x173)
REGMBC(0x1b0) REGMBC(0x1d4) REGMBC(0x1ee7)
@@ -1074,10 +1075,10 @@ static void reg_equi_class(int c)
case 'x': CASEMBC(0x1e8b) CASEMBC(0x1e8d)
regmbc('x'); REGMBC(0x1e8b) REGMBC(0x1e8d)
return;
- case 'y': case '\375': case '\377':
+ case 'y': case 0xfd: case 0xff:
CASEMBC(0x177) CASEMBC(0x1e8f) CASEMBC(0x1e99)
CASEMBC(0x1ef3) CASEMBC(0x1ef7) CASEMBC(0x1ef9)
- regmbc('y'); regmbc('\375'); regmbc('\377');
+ regmbc('y'); regmbc(0xfd); regmbc(0xff);
REGMBC(0x177) REGMBC(0x1e8f) REGMBC(0x1e99)
REGMBC(0x1ef3) REGMBC(0x1ef7) REGMBC(0x1ef9)
return;
diff --git a/src/nvim/strings.c b/src/nvim/strings.c
index fe91141375..37a0fb82da 100644
--- a/src/nvim/strings.c
+++ b/src/nvim/strings.c
@@ -425,9 +425,13 @@ char_u *vim_strchr(const char_u *string, int c)
const char_u *p = string;
if (enc_utf8 && c >= 0x80) {
while (*p != NUL) {
- if (utf_ptr2char(p) == c)
+ int l = (*mb_ptr2len)(p);
+
+ // Avoid matching an illegal byte here.
+ if (l > 1 && utf_ptr2char(p) == c) {
return (char_u *) p;
- p += (*mb_ptr2len)(p);
+ }
+ p += l;
}
return NULL;
}
diff --git a/src/nvim/version.c b/src/nvim/version.c
index db3d4d4bfa..bf1986d3ba 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -420,7 +420,7 @@ static int included_patches[] = {
707,
706,
// 705 NA
- // 704,
+ 704,
// 703 NA
702,
// 701 NA
@@ -468,7 +468,7 @@ static int included_patches[] = {
659,
658,
// 657 NA
- // 656,
+ 656,
655,
654,
653,