fix(screen-context): skip selected-text capture when the clipboard can't be fully restored
Capture still used the old snapshot code: a file copied in Explorer looked empty and was cleared, and Excel's own formats were dropped on restore. It now uses the shared clipboard snapshot policy and leaves the clipboard alone when it couldn't put everything back.
This commit is contained in:
parent
9d0548f871
commit
95656b098a
3 changed files with 31 additions and 55 deletions
|
|
@ -65,6 +65,9 @@ vi.mock('electron', () => ({
|
|||
readHTML: vi.fn(() => ''),
|
||||
readRTF: vi.fn(() => ''),
|
||||
readImage: vi.fn(() => ({ isEmpty: () => true, toPNG: () => Buffer.alloc(0) })),
|
||||
availableFormats: vi.fn((): string[] => []),
|
||||
readBuffer: vi.fn(() => Buffer.alloc(0)),
|
||||
writeBuffer: vi.fn(),
|
||||
write: vi.fn(),
|
||||
},
|
||||
shell: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue