hluk / CopyQ

Clipboard manager with advanced features
GNU General Public License v3.0
8.26k stars 430 forks source link

CopyQ "over-deleting"? #1942

Open Clemens-Ratte-Polle opened 2 years ago

Clemens-Ratte-Polle commented 2 years ago

 CopyQ 6.1.0 ERROR ?! When i press delete sometimes CQ gets stuck little with HD running. Then i press as a reflex Delete a second time. As result 2 items get deleted. But when i try to undo that by STRG+Z only the first element gets undeleted and NOT the second. The second is NOT in the trash tab, it is vanished ! :( This happend 10 times so far i remember. Every time very annoying! :(

hluk commented 2 years ago

I assume that the Trash tab is large and takes longer to load.

There is probably some bug when the default Delete action is overridden with some delay due to running the "Filter" part of the Move to Trash command which check is the item is synchronized to disk. I would need to look into this in more detail.

hluk commented 2 years ago

It is caused by a data race when handling the selected items. I've added some functionality to avoid situations like this some time ago but the Move to Trash command (https://github.com/hluk/copyq-commands/blob/master/Application/undoable-move-to-trash.ini) needs to be updated.

hluk commented 2 years ago

Fixed. Can you add the fixed commands again?

Clemens-Ratte-Polle commented 2 years ago

Thank you! :) You write about "fixed commands" - which are them? I read only about this: undoable-move-to-trash.ini I will paste code into commands menu. There are 6000 items in the trash tab, but also many heavy other tabs. This error happens also sometimes when joining selected items. I hope your fix does it all good :) thx

Clemens-Ratte-Polle commented 2 years ago

ok, now there is a changing behaviour of DEL an item: after pressing del key the next item is no longer marked automatically. This is not so practically when often deleting more items to press down and up or use the mouse to do this.

hluk commented 2 years ago

I fixed the command again.

You write about "fixed commands" - which are them?

I said "fixed commands" because there are two commands grouped together under same source .ini file:

hluk commented 2 years ago

:disappointed: Damn, the new "Move to Trash" command has problems with large data items - like larger images with multiple image formats.

hluk commented 2 years ago

I fixed those two commands again.