Skip to content

Commit f5ee361

Browse files
authored
lib: clear clipboard on paste (#297)
* lib: clear clipboard on paste * lib: only clear clipboard if cut op
1 parent daf1980 commit f5ee361

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/mod.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,9 @@ export async function setup(document: Document, target: HTMLElement, backend: Ba
180180
const p = ctx.path.clone();
181181
p.pop();
182182
workbench.focus(p.append(workbench.clipboard.node));
183+
if (workbench.clipboard.op === "cut") {
184+
workbench.clipboard = undefined;
185+
}
183186
}
184187
});
185188
workbench.keybindings.registerBinding({ command: "paste", key: "meta+v" });

0 commit comments

Comments
 (0)