sabrogden / Ditto

Ditto is an extension to the Windows Clipboard. You copy something to the Clipboard and Ditto takes what you copied and stores it in a database to retrieve at a later time.
https://ditto-cp.sourceforge.io/
3.95k stars 208 forks source link

Ditto /PlainTextPaste command-line option doesn't output the correct clipboard content #466

Open samegek opened 1 year ago

samegek commented 1 year ago

Description:

When using the Ditto.exe /PlainTextPaste command-line option to output the current clipboard content, the output is incorrect after deleting the latest copied item from the Ditto clipboard history.

For example:

  1. Copy "hello, world".
  2. Execute Ditto.exe /PlainTextPaste , the output is "hello, world".
  3. Copy "foo, bar".
  4. Execute Ditto.exe /PlainTextPaste , the output is "foo, bar".
  5. Delete "foo, bar" from Ditto clipboard history.
  6. Execute Ditto.exe /PlainTextPaste , the output is still "foo, bar", but it should be "hello, world".
  7. However, using the default paste shortcut works correctly and outputs "hello, world". Expected behavior: When executing Ditto.exe /PlainTextPaste , the output should always match the latest clipboard content, even after deleting an item from Ditto clipboard history.

Steps to reproduce:

  1. Copy some text.
  2. Execute Ditto.exe /PlainTextPaste , verify that the output matches the clipboard content.
  3. Copy some more text.
  4. Execute Ditto.exe /PlainTextPaste , verify that the output matches the latest clipboard content.
  5. Delete the latest copied item from Ditto clipboard history.
  6. Execute Ditto.exe /PlainTextPaste , verify that the output still matches the latest clipboard content. Environment:

Ditto Version 03.24.214.OO 32bit Sqlite Version 3.33.0 win10

sabrogden commented 1 year ago

This works the way it's intended to work. /PlainTextPaste goes off of the current clipboard contents, not the top or any clip in Ditto.

samegek commented 1 year ago

but default i can easily get current clipboard by other way, but i cant get top clip in ditto by command line. i need a interface get ditto top clip