Skip to content

Commit

Permalink
clipmenud: fix deletion threshold check
Browse files Browse the repository at this point in the history
  • Loading branch information
N-R-K authored and cdown committed Nov 9, 2024
1 parent a904f3f commit 008642f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/clipmenud.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ static int handle_selection_notify(const XSelectionEvent *se) {
static void maybe_trim(void) {
size_t cur_clips;
expect(cs_len(&cs, &cur_clips) == 0);
if ((int)cur_clips > cfg.max_clips_batch) {
if (cur_clips > (size_t)cfg.max_clips + (size_t)cfg.max_clips_batch) {
expect(cs_trim(&cs, CS_ITER_NEWEST_FIRST, (size_t)cfg.max_clips) == 0);
}
}
Expand Down

0 comments on commit 008642f

Please sign in to comment.