Fix search-mode Command-Delete, silent paste failures, and buried pasted clips - #92
Open
alvst wants to merge 1 commit into
Open
Fix search-mode Command-Delete, silent paste failures, and buried pasted clips#92alvst wants to merge 1 commit into
alvst wants to merge 1 commit into
Conversation
Cmd-Delete while a search query is being edited now clears the query instead of destroying the selected clip - previously the cmd check ran before the search-text check, so it always won regardless of what was being typed. Direct paste blocked by a missing Accessibility grant no longer no-ops silently: an alert (once per launch) explains the clip was still copied, that Cmd-V pastes it manually, and links to the Accessibility pane - a common state, since every rebuild invalidates the grant. Pasting can now promote the clip to the top of history, matching how Copy already behaves (reuses ClipboardStore.promoteCopiedItem, the same method the Cmd-C branch adds - trivial to reconcile when both merge). It's a Behavior toggle, on by default; turning it off restores the old stay-in-place ordering.
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.
Three things that make pasting feel unreliable: ⌘⌫ destroying a clip when you meant to clear the search, a paste that silently does nothing when Accessibility isn't granted, and a clip you just pasted staying wherever it was in history.
What changed
Screenshots
Before:

After:

The ⌘⌫ fix has no visual delta — it's a key-handling correction, shown only by the query surviving the keystroke.
Notes for review
promoteOnPasteships ON by default, and that's deliberate. Pasting a clip is a re-use of it, exactly like copying one, and Copy already reorders history this way — shipping the two with opposite defaults would be the inconsistency. It's a silent reordering for existing users, so it gets a Behavior toggle that restores the old ordering in one click. Happy to flip the default if you'd rather; the toggle exists either way.#if MASbranch never reaches it) — verified, so there's no App Store review surface here.alvie/pr-cmd-c-copyadds a byte-identicalClipboardStore.promoteCopiedItem(_:at:). Git puts them in different regions of the file, so it will not conflict — it will produce two identical methods and a redeclaration error. Whichever merges second, delete the duplicate.This feature should be bundled into v2.
Part of #80.