aboutsummaryrefslogtreecommitdiffhomepage
path: root/.config/nvim/lua/uniquify.lua
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/lua/uniquify.lua')
-rw-r--r--.config/nvim/lua/uniquify.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/.config/nvim/lua/uniquify.lua b/.config/nvim/lua/uniquify.lua
index b9b9d32..c7f8482 100644
--- a/.config/nvim/lua/uniquify.lua
+++ b/.config/nvim/lua/uniquify.lua
@@ -8,6 +8,12 @@ local stricmp = vim.stricmp
function M.uniquify(this_path, other_paths)
+ for i = 1, #other_paths do
+ if other_paths[i] == this_path then
+ table.remove(other_paths, i)
+ end
+ end
+
-- Split each path into slash-separated parts.
for i = 1, #other_paths do
other_paths[i] = split(other_paths[i], '[\\/]')