Skip to content

clipboard: allow searching the clipboard history#1504

Open
pslldq wants to merge 5 commits intofcitx:masterfrom
pslldq:betterclip
Open

clipboard: allow searching the clipboard history#1504
pslldq wants to merge 5 commits intofcitx:masterfrom
pslldq:betterclip

Conversation

@pslldq
Copy link
Copy Markdown
Contributor

@pslldq pslldq commented Feb 4, 2026

Implement a search functionality for the clipboard to allow searching in the clipboard history. Also don't impose a max history limit (of 30).

I've did some basic test and while the search is not optimized in any way, it works fine on ~21K entries without even maxing out a CPU core.

Sven Püschel added 5 commits February 3, 2026 23:33
Add an erase method to erase an iterator from the given set. This allow
erasing elements while iterating over the set.
Optimize deleting password entries by utilizing the new OrderedSet erase
method. This allows to only iterate once over all passwords and directly
remove the expired ones. As the erase method returns the iterator for
the next element, we avoid incrementing the iterator in the for loop
header.
Don't limit the max number of entries. While having a huge number of
entries might cause performance/resource issues, allow the user to tune
it to their hardware and his needs.
In preparation of enabling the user to search the history, drop the
backspace function of deleting the history. History can still be deleted
with the delete key.
Implement a search functionality to allow searching for previous
clipboard entries. This enables the user to search for a given entry.
It works similar to the unicode module, which allows searching for a
given unicode symbol.
Comment thread src/modules/clipboard/clipboard.cpp
Comment thread src/modules/clipboard/clipboard.cpp
Comment thread src/modules/clipboard/clipboard.cpp
@pslldq
Copy link
Copy Markdown
Contributor Author

pslldq commented Feb 19, 2026

Hmm, this PR seems to be bugged a bit (for me?) as it still shows the old diff despite the branch being updated: master...pslldq:fcitx5:betterclip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants