Skip to content

Commit 1ace2d3

Browse files
mxvshclaude
andcommitted
fix: suppress clipboard history recording during paste
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 69c866e commit 1ace2d3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Wave/Services/PasteService.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@ struct PasteService {
3333
}
3434

3535
pasteboard.clearContents()
36-
pasteboard.setString(text, forType: .string)
36+
// Write with ConcealedType so clipboard managers skip recording this transient write
37+
let item = NSPasteboardItem()
38+
item.setString(text, forType: .string)
39+
item.setData(Data(), forType: NSPasteboard.PasteboardType("org.nspasteboard.ConcealedType"))
40+
pasteboard.writeObjects([item])
3741

3842
// Simulate Cmd+V
3943
let src = CGEventSource(stateID: .hidSystemState)

0 commit comments

Comments
 (0)