From a889d819374f1684ff0814d98de8d3713e080687 Mon Sep 17 00:00:00 2001 From: Brandon Conway Date: Wed, 17 Mar 2021 08:56:08 -0700 Subject: [PATCH] Use .get_length() to support sparse arrays --- lua/harpoon/mark.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/harpoon/mark.lua b/lua/harpoon/mark.lua index d898f4f..466e54a 100644 --- a/lua/harpoon/mark.lua +++ b/lua/harpoon/mark.lua @@ -34,7 +34,7 @@ end local function mark_exists(buf_name) local marks = harpoon.get_mark_config().marks - for idx = 1, #marks do + for idx = 1, M.get_length() do if marks[idx] == buf_name then return true end