Spoons icon indicating copy to clipboard operation
Spoons copied to clipboard

ClipboardTools has error

Open sky9900 opened this issue 2 years ago • 1 comments

image

sky9900 avatar Apr 11 '23 07:04 sky9900

This appears to be fixed. The current version of that block of text is:

-- Internal method: deduplicate the given list, and restrict it to the history size limit
function obj:dedupe_and_resize(list)
   local res={}
   local hashes={}
   for i,v in ipairs(list) do
      if #res < self.hist_size then
         local hash=hashfn(v.content)
         if (not self.deduplicate) or (not hashes[hash]) then
            table.insert(res, v)
            hashes[hash]=true
         end 
      end
   end
   return res
end

jacix avatar Jul 18 '24 05:07 jacix