mirror of
https://github.com/ThePrimeagen/harpoon.git
synced 2025-07-13 17:40:25 +00:00
Performance improvement for store_offset(), partial fix for #188
This commit is contained in:
parent
4dfe94e633
commit
0e414fdd5f
@ -150,8 +150,9 @@ function M.get_index_of(item)
|
|||||||
|
|
||||||
if type(item) == "string" then
|
if type(item) == "string" then
|
||||||
local relative_item = utils.normalize_path(item)
|
local relative_item = utils.normalize_path(item)
|
||||||
|
local marks = harpoon.get_mark_config().marks
|
||||||
for idx = 1, M.get_length() do
|
for idx = 1, M.get_length() do
|
||||||
if M.get_marked_file_name(idx) == relative_item then
|
if marks[idx] and marks[idx].filename == relative_item then
|
||||||
return idx
|
return idx
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user