mirror of
https://github.com/ThePrimeagen/harpoon
synced 2024-09-16 13:34:03 +02:00
Performance improvement for store_offset(), partial fix for #188
This commit is contained in:
parent
4dfe94e633
commit
0e414fdd5f
1 changed files with 2 additions and 1 deletions
|
@ -150,8 +150,9 @@ function M.get_index_of(item)
|
|||
|
||||
if type(item) == "string" then
|
||||
local relative_item = utils.normalize_path(item)
|
||||
local marks = harpoon.get_mark_config().marks
|
||||
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
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue