mirror of
https://github.com/neovim/neovim.git
synced 2025-12-15 19:05:40 +00:00
feat(lua): add vim.list.unique()
Problem: No way to deduplicate values in a list in-place Solution: Add `vim.list.unique()`
This commit is contained in:
committed by
Lewis Russell
parent
7a051a4c38
commit
cf9b36f3d9
2
runtime/lua/vim/_meta/vimfn.lua
generated
2
runtime/lua/vim/_meta/vimfn.lua
generated
@@ -10628,6 +10628,8 @@ function vim.fn.undofile(name) end
|
||||
--- @return vim.fn.undotree.ret
|
||||
function vim.fn.undotree(buf) end
|
||||
|
||||
--- Note: Prefer |vim.list.unique()| in Lua.
|
||||
---
|
||||
--- Remove second and succeeding copies of repeated adjacent
|
||||
--- {list} items in-place. Returns {list}. If you want a list
|
||||
--- to remain unmodified make a copy first: >vim
|
||||
|
||||
Reference in New Issue
Block a user