fixup! genvimvim.lua: fix matching functions

This commit is contained in:
Daniel Hahler 2016-07-14 00:42:55 +02:00
parent e63c6ca8f2
commit 329f922f14
2 changed files with 14 additions and 5 deletions

View File

@ -83,8 +83,9 @@ install_nvim() {
exit 1
}
local genvimsynf=syntax/vim/generated.vim
# Check that all runtime files were installed
for file in doc/tags syntax/vim/generated.vim $(
for file in doc/tags $genvimsynf $(
cd runtime ; git ls-files | grep -e '.vim$' -e '.ps$' -e '.dict$' -e '.py$' -e '.tutor$'
) ; do
if ! test -e "${INSTALL_PREFIX}/share/nvim/runtime/$file" ; then
@ -93,6 +94,13 @@ install_nvim() {
fi
done
# Check that generated syntax file has function names, #5060.
local gpat='syn keyword vimFuncName .*eval'
if ! grep -q "$gpat" $genvimsynf ; then
echo "It appears that $genvimsynf does not contain $gpat."
exit 1
fi
for file in $(
cd runtime ; git ls-files | grep -e '.awk$' -e '.sh$' -e '.bat$'
) ; do

View File

@ -124,11 +124,12 @@ for line in eval_fd:lines() do
break
end
local func_name = line:match('^ { "([%w_]+)",')
assert(func_name, 'Did not find a function in line: '..line)
if lld.line_length > 850 then
w('\n' .. vimfun_start)
if func_name then
if lld.line_length > 850 then
w('\n' .. vimfun_start)
end
w(' ' .. func_name)
end
w(' ' .. func_name)
end
end
eval_fd:close()