fregante / GhostText

👻 Use your text editor to write in your browser. Everything you type in the editor will be instantly updated in the browser (and vice versa).
https://GhostText.fregante.com
MIT License
3.25k stars 116 forks source link

Close the VSCode tab after disconnection #291

Open kevintraver opened 10 months ago

kevintraver commented 10 months ago

When saving the document in vscode, the focus is brought back to the browser, and then the popup message says 'Disconnected', but the document remains as a tab in VS Code.

Is this by design? Is there a way to automatically have the document close after saving? Otherwise there ends up a bunch of open documents when switching back to VSCode.

fregante commented 10 months ago

When saving the document in vscode, the focus is brought back to the browser

This should not happen. I assume you're talking about "closing the connection from the browser". In which case, yes, the tab is not meant to automatically close.

In the Sublime Text plugin this is actually an option, so I'd accept a PR to automatically close the tab on disconnection.

kevintraver commented 10 months ago

I am referring to both ways. If you are in the browser or in the text editor. In both cases, once the disconnect happens, the text editor tab remains open.

kevintraver commented 10 months ago

PR: https://github.com/fregante/GhostText-for-VSCode/pull/15