From e63c6ca8f2483fc4882585db0168f66860799959 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 13 Jul 2016 16:52:18 +0200 Subject: [PATCH] genvimvim.lua: fix matching functions Fixes https://github.com/neovim/neovim/issues/5060. --- scripts/genvimvim.lua | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/scripts/genvimvim.lua b/scripts/genvimvim.lua index 9135c8e3ab..35e9e8ce00 100644 --- a/scripts/genvimvim.lua +++ b/scripts/genvimvim.lua @@ -123,13 +123,12 @@ for line in eval_fd:lines() do if line == '};' then break end - local func_name = line:match('^ {"(%w+)",') - if func_name then - if lld.line_length > 850 then - w('\n' .. vimfun_start) - end - w(' ' .. func_name) + 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) end + w(' ' .. func_name) end end eval_fd:close()