Skip to content
This repository has been archived by the owner on Jul 28, 2024. It is now read-only.

Commit

Permalink
fix compare number with nil error, when buffer is harpooned on a mark…
Browse files Browse the repository at this point in the history
… greater then the number of indicators
  • Loading branch information
abeldekat committed Mar 22, 2024
1 parent a4a045a commit 282029a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/harpoonline/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ end
-- Return true is the current buffer is harpooned, false otherwise
-- Useful for extra highlighting
---@return boolean
Harpoonline.is_buffer_harpooned = function() return H.data.buffer_idx and true or false end
Harpoonline.is_buffer_harpooned = function() return H.data.buffer_idx ~= nil end

-- The function to be used by consumers
---@return string
Expand Down Expand Up @@ -294,7 +294,7 @@ H.builtin_extended = function(data, opts)
-- add more marks indicator
if data.list_length > nr_of_slots then -- more marks then...
local ind = opts.more_marks_indicator
if nr_of_slots < data.buffer_idx then ind = opts.more_marks_active_indicator end
if data.buffer_idx and data.buffer_idx > nr_of_slots then ind = opts.more_marks_active_indicator end
if ind and ind ~= '' then table.insert(status, ind) end
end

Expand Down

0 comments on commit 282029a

Please sign in to comment.