Merge #5782 'Visual-mode put from @. register'

This commit is contained in:
Justin M. Keyes
2017-01-22 11:10:24 +01:00
5 changed files with 1064 additions and 43 deletions

View File

@@ -91,6 +91,24 @@ local function tmpname()
end
end
local function map(func, tab)
local rettab = {}
for k, v in pairs(tab) do
rettab[k] = func(v)
end
return rettab
end
local function filter(filter_func, tab)
local rettab = {}
for _, entry in pairs(tab) do
if filter_func(entry) then
table.insert(rettab, entry)
end
end
return rettab
end
return {
eq = eq,
neq = neq,
@@ -98,4 +116,6 @@ return {
check_logs = check_logs,
uname = uname,
tmpname = tmpname,
map = map,
filter = filter,
}