···44-- Function to add yanked text to table
55function M.add_yank(yanks, text, max_entries)
66 -- avoid adding empty strings
77- if text ~= "" and text ~= "\n" then
77+ if text ~= "" and text ~= " " and text ~= "\n" then
88 -- do not update with duplicate values
99 for _, entry in ipairs(yanks) do
1010 if entry == text then
···3535 if vim.v.event.regname == '' then
3636 local yanked_text = vim.fn.getreg(rn)
37373838- -- don't track single character deletions
3939- if #yanked_text <= 1 and reg_type ~= "y" then
4040- return
3838+ -- NOTE: this only blocks adding to list if something else is in plus register
3939+ if string.len(yanked_text) <= 1 then
4040+ return
4141 end
42424343 M.add_yank(yanks, yanked_text, max_entries)