Description
Is your feature request related to a problem? Please describe.
I like using our freshly updated clipboard ring—it expands the limits of what clipboards can do. However, I often end up with duplicate pieces of data if I do this editing sequence, for example:
- edit text
- copy "foo"
- edit-text
- copy "bar"
- edit text
- copy exact same "foo"
After it, clipboard ring looks like "foo", "bar", "foo"
. Having these duplicate entries clutters the view and makes clipboard ring much less useful.
Describe the solution you'd like
Remove duplicates from the ring. My first implementation itch is to migrate to plain lists and do pushnew
on them, which would be simple, fast, and dependency-free. containers:ring-buffer
seems to not de-duplicate the data and is otherwise not used to its full power, so I don't see much use in it here.
Describe alternatives you've considered
Obviously, my initial implementation itch may be wrong. @Ambrevar, are you maybe aware of de-duplicating data structures from e.g. containers
, that we can use?