Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In Insiders: Edit is only valid while callback runs #324

Closed
gotofritz opened this issue Feb 20, 2022 · 2 comments
Closed

In Insiders: Edit is only valid while callback runs #324

gotofritz opened this issue Feb 20, 2022 · 2 comments

Comments

@gotofritz
Copy link

Trying to wrap different at 72 chars, various blocks of text. Error:

    at _throwIfFinalized (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:83:44601)
    at _.delete (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:83:44940)
    at /Users/fritz/.vscode-insiders/extensions/stkb.rewrap-17.7.0/dist/Extension.js:15125:91
    at Array.forEach (<anonymous>)
    at $9e2fa7da53fb418a$export$db4041490cae3922 (/Users/fritz/.vscode-insiders/extensions/stkb.rewrap-17.7.0/dist/Extension.js:15125:19)
    at $09ff662961d6d81c$var$doWrap (/Users/fritz/.vscode-insiders/extensions/stkb.rewrap-17.7.0/dist/Extension.js:15443:9)
    at $09ff662961d6d81c$var$rewrapCommentAtCommand (/Users/fritz/.vscode-insiders/extensions/stkb.rewrap-17.7.0/dist/Extension.js:15418:5)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) (at $9e2fa7da53fb418a$export$7cc2a9afec49ab22 (/Users/fritz/.vscode-insiders/extensions/stkb.rewrap-17.7.0/dist/Extension.js:15136:13))

My system:

Commit: 1d618b2df1cf08f0e3ab706353f0a8f6f1424795
Date: 2022-02-18T05:15:42.132Z (2 days ago)
Electron: 16.0.9
Chromium: 96.0.4664.174
Node.js: 16.9.1
V8: 9.6.180.23-electron.0
OS: Darwin x64 21.2.0```
@stkb
Copy link
Owner

stkb commented Feb 21, 2022

@gotofritz @TheNetAdmin Thanks, this is restricted to the "Rewrap At..." command and a fix is on the way.

stkb added a commit that referenced this issue Feb 21, 2022
Unlike the `rewrapCommentCommand` function, `rewrapCommentAtCommand` has
to be async, because it shows the input popup first. So it can't use the
editBuilder passed directly in (this gives the error "Edit is only valid
while callback runs").

So we have to go back to the old way of using the `editor.edit(...)`
function here. Don't think any harm should come from this.
@stkb
Copy link
Owner

stkb commented Feb 21, 2022

The fix is now in v17.8. Thanks both for using the pre-release version.

@stkb stkb closed this as completed Feb 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants