Skip to content

Commit ee3098d

Browse files
authored
Fix broken paste action (#1526)
- Fixes #1521 ## Checklist - [ ] I have added [tests](https://www.cursorless.org/docs/contributing/test-case-recorder/) - [ ] I have updated the [docs](https://github.com/cursorless-dev/cursorless/tree/main/docs) and [cheatsheet](https://github.com/cursorless-dev/cursorless/tree/main/cursorless-talon/src/cheatsheet) - [ ] I have not broken the cheatsheet
1 parent 65fab51 commit ee3098d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/cursorless-vscode/src/ide/vscode/VscodeTextEditorImpl.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,10 @@ export class VscodeTextEditorImpl implements EditableTextEditor {
133133
}
134134

135135
public async clipboardPaste(_ranges?: Range[]): Promise<void> {
136+
// We add these sleeps here to workaround a bug in VSCode. See #1521
137+
await sleep(100);
136138
await vscode.commands.executeCommand("editor.action.clipboardPasteAction");
139+
await sleep(100);
137140
}
138141

139142
public async indentLine(_ranges?: Range[]): Promise<void> {

0 commit comments

Comments
 (0)