Merge pull request #1250 from kylo252/fixup

chore: remove now-redundant utility function
This commit is contained in:
kylo252 2021-08-06 13:54:25 +02:00 committed by GitHub
commit c8d1b95712
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 28 deletions

View file

@ -113,32 +113,6 @@ function utils.get_active_client_by_ft(filetype)
return nil
end
--- Extends a list-like table with the unique values of another list-like table.
---
--- NOTE: This mutates dst!
---
--@see |vim.tbl_extend()|
---
--@param dst list which will be modified and appended to.
--@param src list from which values will be inserted.
--@param start Start index on src. defaults to 1
--@param finish Final index on src. defaults to #src
--@returns dst
function utils.list_extend_unique(dst, src, start, finish)
vim.validate {
dst = { dst, "t" },
src = { src, "t" },
start = { start, "n", true },
finish = { finish, "n", true },
}
for i = start or 1, finish or #src do
if not vim.tbl_contains(dst, src[i]) then
table.insert(dst, src[i])
end
end
return dst
end
function utils.unrequire(m)
package.loaded[m] = nil
_G[m] = nil