Skip to content

Commit

Permalink
Manage a separate paste buffer for middle click
Browse files Browse the repository at this point in the history
When we copy, save the current clipboard prior to copying,
then when we notice the clipboard change, store that clipboard
in a separate pasteItems and restore the old clipboard.  When we
paste via middle button, set the clipboard to the stored pasteItems,
and when we can set the clipboard back to the saved current clipboard.

Because of that, restore copy-on-double-click behavior, as the typical
patterns work well with a separate clipboard and selection buffer.
There's still a little bit of a race if you select/paste too fast though?
  • Loading branch information
josephlbarnett committed Mar 21, 2024
1 parent 60314dd commit e724da8
Showing 1 changed file with 271 additions and 155 deletions.
Loading

0 comments on commit e724da8

Please sign in to comment.