mirror of
https://github.com/ThePrimeagen/harpoon.git
synced 2025-07-13 17:40:25 +00:00
Merge pull request #81 from rudotriton/fix-indexing-nils
prevent indexing nil vals in ensure_correct_config
This commit is contained in:
commit
beb361aaf2
@ -88,8 +88,8 @@ local function ensure_correct_config(config)
|
||||
end
|
||||
|
||||
local marks = proj.mark.marks
|
||||
for idx = 1, #marks do
|
||||
local mark = marks[idx]
|
||||
|
||||
for idx, mark in pairs(marks) do
|
||||
if type(mark) == "string" then
|
||||
mark = {
|
||||
filename = mark,
|
||||
|
@ -269,11 +269,10 @@ M.get_length = function()
|
||||
end
|
||||
|
||||
M.set_current_at = function(idx)
|
||||
local config = harpoon.get_mark_config()
|
||||
local buf_name = get_buf_name()
|
||||
local current_idx = M.get_index_of(buf_name)
|
||||
|
||||
log.trace("set_current_at(): Setting id", idx, buf_name)
|
||||
local config = harpoon.get_mark_config()
|
||||
local current_idx = M.get_index_of(buf_name)
|
||||
|
||||
-- Remove it if it already exists
|
||||
if M.valid_index(current_idx) then
|
||||
|
Loading…
x
Reference in New Issue
Block a user