remote-vscode
remote-vscode copied to clipboard
Work around onDidCloseTextDocument firing on a wrong document.
Sometimes onDidCloseTextDocument seems to get called with a different document (something involving git?). This works around the problem by also watching the list of visible editors, and closing the session.
Works around issue #26, related to upstream issue https://github.com/Microsoft/vscode/issues/30820.
Unfortunately this only works for case one tab has been opened and then closed.
visibleTextEditors[]
are not all opened tabs, but only visible (usually just current one)
https://github.com/Microsoft/vscode/issues/15178
So, any actions with tabs closes Session for first opened file.
For example try:
-
rmate -w file
- Doubleclick tab-bar to open new blank tab
- See that Session is already stopped, while first file is still open