aswinkumar863 / sort-editors-vscode

Automatically sorts the VSCode editors when they are opened

Home Page:https://marketplace.visualstudio.com/items?itemName=aswinkumar863.sort-editors

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sort open editors fails if an editor is open for a file that's been removed

vvuk opened this issue · comments

If you have an editor open with a file that's been removed on disk, sort open editors fails, with this error popping up in the console. I see the "sorting open editors 1/74" notification pop up briefly, and then get removed and no sorting happens.

console.ts:137 [Extension Host] stack trace: Error: cannot open file:///opt/..../nonexistent_file.txt. Detail: Unable to read file '/opt/...../nonexistent_file.txt' (Error: Unable to resolve nonexistent file '/opt/...../nonexistent_file.txt')
    at r.$tryOpenDocument (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2774:76432)
I @ console.ts:137
$logExtensionHostMessage @ mainThreadConsole.ts:39
_doInvokeHandler @ rpcProtocol.ts:455
_invokeHandler @ rpcProtocol.ts:440
_receiveRequest @ rpcProtocol.ts:370
_receiveOneMessage @ rpcProtocol.ts:296
(anonymous) @ rpcProtocol.ts:161
invoke @ event.ts:626
deliver @ event.ts:828
fire @ event.ts:789
fire @ ipc.net.ts:646
_receiveMessage @ ipc.net.ts:988
(anonymous) @ ipc.net.ts:852
invoke @ event.ts:626
deliver @ event.ts:828
fire @ event.ts:789
acceptChunk @ ipc.net.ts:390
(anonymous) @ ipc.net.ts:346
E @ ipc.net.ts:87
emit @ node:events:526
addChunk @ node:internal/streams/readable:315
readableAddChunk @ node:internal/streams/readable:289
Readable.push @ node:internal/streams/readable:228
onStreamRead @ node:internal/stream_base_commons:190

Handled in latest version 2.0.1.