db: replace \CHECKED\ atomic flag with pattern-keyed regex cache

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I9d5fa5212c5418ce6bca02d05149e1356a6a6964
This commit is contained in:
raf 2026-03-05 15:14:02 +03:00
commit b1f43bdf7f
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
5 changed files with 106 additions and 39 deletions

View file

@ -412,7 +412,7 @@ impl SqliteClipboardDb {
},
(KeyCode::Enter, _) => actions.copy = true,
(KeyCode::Char('D'), KeyModifiers::SHIFT) => {
actions.delete = true
actions.delete = true;
},
(KeyCode::Char('/'), _) => actions.toggle_search = true,
_ => {},
@ -697,7 +697,7 @@ impl SqliteClipboardDb {
let opts = Options::new();
let mime_type = match mime {
Some(ref m) if m == "text/plain" => MimeType::Text,
Some(ref m) => MimeType::Specific(m.clone().to_owned()),
Some(ref m) => MimeType::Specific(m.clone().clone()),
None => MimeType::Text,
};
let copy_result = opts