remote-vscode icon indicating copy to clipboard operation
remote-vscode copied to clipboard

Work around onDidCloseTextDocument firing on a wrong document.

Open mprobst opened this issue 6 years ago • 1 comments

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.

mprobst avatar Oct 06 '17 11:10 mprobst

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

sepich avatar Mar 10 '19 14:03 sepich