Implement paste stack#1206
Closed
weisJ wants to merge 19 commits intop0deje:masterfrom
Closed
Conversation
Collaborator
Author
|
Is the bitwise CI working properly? The details page gives me an internal server error. |
1b4cd1e to
f25c692
Compare
2 tasks
Merged
Draft
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is an implementation of the paste stack proposed in #1175 (comment).
The basis for this is an added multiple selection functionality. To select multiple items one can either use one of the following keyboard shortcuts
SHIFT + DownArrow/CTRL + SHIFT + n: Extend the selection to the next itemSHIFT + CMD/Option + DownArrow/CONTR + OPTION + SHIFT + n: Extend the selection to the last itemSHIFT + UpArrow/CTRL + SHIFT + p: Extend the selection to the previous itemSHIFT + CMD/Option + UpArrow/CONTR + OPTION + SHIFT + p: Extend the selection to the first itemor
CMD + Clickwith the mouse to select additional items.The order they are selected in is displayed next to the item content.
Once more than one item is selected moving the mouse over other items no longer auto selects the item as this would make mouse selection impossible and make accidentally clearing the whole selection to easy.
Pinning and deleting multiple items works as expected.
One can then use any of the existing shortcuts to create a paste stack.
This immediately copies the first selected item to the clipboard ready to paste. Once the item has been pasted it is removed from the top of the paste stack and the next item is automatically copied to the clipboard. The paste stack remembers the shortcut used to create the stack i.e. if the "copy without formatting" shortcut was used then all subsequent copies will also be copied without formatting.
Note that the "paste automatically" option does not work with paste stacks. Pasting always has to be initiated by the user.
I did not manage to listen for
CMD + Vusing the carbon api without the shortcut being consumed (with the result that pasting becomes impossible). This feature therefore requires accessibility permissions as it globally listens forCMD+Vkey presses.The current paste stack is displayed at the top of the history list. The number displays the current number of items in the stack.
Here is a video of the behaviour in action. The visuals are slightly outdated but the user interaction hasn't changed since:
Screen.Recording.2025-09-04.at.14.41.19.mov
It can be selected like any other entry. To discard the current paste stack simply delete it using
OPTION + Backspace.If any other copy happens while the paste stack is active (either through Maccy or otherwise) the stack is discarded. Feedback on this would be welcome as I had no better idea what the behaviour should be in this case.
The paste stack does not reorder any items in the history list on its own. The items get moved to the start of the list just as if they were copied regularly. After pasting all items of the stack this effectively puts the items of the paste stack at the start of the history list in reverse oder (Assuming sorting by time of last copy).
I have tried to group the changes into logical steps. Every commit should compile on its own, but there may be things included in some changes, which are only used in a later commit.
Relates to #1175 #239