mirror of
https://github.com/ThePrimeagen/harpoon.git
synced 2025-07-13 17:40:25 +00:00
Merge pull request #37 from asbjornhaland/add_status_method
feat(mark): add status method
This commit is contained in:
commit
dcaf802877
@ -60,6 +60,15 @@ M.get_index_of = function(item)
|
||||
return nil
|
||||
end
|
||||
|
||||
M.status = function()
|
||||
local idx = M.get_index_of(get_buf_name())
|
||||
|
||||
if M.valid_index(idx) then
|
||||
return "M" .. idx
|
||||
end
|
||||
return ""
|
||||
end
|
||||
|
||||
M.valid_index = function(idx)
|
||||
local config = harpoon.get_mark_config()
|
||||
return idx ~= nil and config.marks[idx] ~= nil and config.marks[idx] ~= ""
|
||||
|
Loading…
x
Reference in New Issue
Block a user