diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-09-06 01:30:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-06 01:30:53 +0200 |
commit | 5de6f97408d72705fd6f1e17d35b2877cfef1409 (patch) | |
tree | 2d6e336b66849e2e3a759e43aa7f95dade7a005e /runtime/autoload/msgpack.vim | |
parent | 51d42917f0a225d6e40cb4746395b3a934d71be2 (diff) | |
parent | a9fa66b5b81e75ad1794aa03baa74083b6f0ba50 (diff) | |
download | rneovim-5de6f97408d72705fd6f1e17d35b2877cfef1409.tar.gz rneovim-5de6f97408d72705fd6f1e17d35b2877cfef1409.tar.bz2 rneovim-5de6f97408d72705fd6f1e17d35b2877cfef1409.zip |
Merge #8961 from ZyX-I/fix-8956
Diffstat (limited to 'runtime/autoload/msgpack.vim')
-rw-r--r-- | runtime/autoload/msgpack.vim | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/runtime/autoload/msgpack.vim b/runtime/autoload/msgpack.vim index 09c99c940d..7dd225e3d9 100644 --- a/runtime/autoload/msgpack.vim +++ b/runtime/autoload/msgpack.vim @@ -605,13 +605,10 @@ function msgpack#eval(s, special_objs) abort call add(expr, dec) endif endif - elseif s =~# '-\?\%(inf\|nan\)' - if s[0] is# '-' - call add(expr, '-') - let s = s[1:] - endif - call add(expr, s:MSGPACK_SPECIAL_OBJECTS[s[0:2]]) - let s = s[3:] + elseif s =~# '\v^\-%(inf|nan)' + call add(expr, '-') + call add(expr, s:MSGPACK_SPECIAL_OBJECTS[s[1:3]]) + let s = s[4:] elseif stridx('="+', s[0]) != -1 let match = matchlist(s, '\v\C^(\=|\+\((\-?\d+)\)|)(\"%(\\.|[^\\"]+)*\")') if empty(match) |