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

Closing file do not work anymore. #26

Open
thierrymichel opened this issue May 29, 2017 · 10 comments
Open

Closing file do not work anymore. #26

thierrymichel opened this issue May 29, 2017 · 10 comments

Comments

@thierrymichel
Copy link

Hi,

First fo all, thanks for this extension!

Since the april update (not completely sure about the date), I need to close the window to end properly the rmate process.
Previously, it was working when closing the file (which is more convenient than closing and reopening VSC every time).
Any idea ?

VSC version 1.12.2
MacOS Sierra 10.12.5
rmate 1.5.9 (2017-02-10) on linux

Thanks

@thierrymichel
Copy link
Author

It fails when using rmate -w (for git commit messages, for example)

@rafaelmaiolla
Copy link
Owner

I didn't test this this scenario. So, I'm not surprise if it doesn't work. I will investigate the issue.

@sarim
Copy link

sarim commented Jul 15, 2017

@rafaelmaiolla Any progress in this? I'm having the same issue.

@rafaelmaiolla
Copy link
Owner

There is something wrong with VSCode. It is not calling onDidCloseTextDocument as expected. So, it is not possible to identify that the file is closed.

In my tests, it is taking 3 min for the VSCode to call the onDidCloseTextDocument. I'll need to check if there is anything open regarding this issue.

@rafaelmaiolla
Copy link
Owner

I open an issue for vscode microsoft/vscode#30820

@sarim
Copy link

sarim commented Jul 17, 2017

While that is being sorted out, maybe you can create a new command >Remote: Close All Files. The command will close any editor tabs open via remote and close files properly.

@rafaelmaiolla
Copy link
Owner

It seems that it stop working in version 1.13.1.

Version 1.12.2 is working as expected.

mprobst added a commit to mprobst/remote-vscode that referenced this issue Oct 6, 2017
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 rafaelmaiolla#26, related to upstream issue
microsoft/vscode#30820.
@LukeIreland1
Copy link

@rafaelmaiolla Where did you get up to with this? I want to use VS Code as my Git Editor. Currently works fine for editing files normally, but using rmate -w as Git Editor doesn't send the edit back to the server/ssh session, and just hangs.

@rafaelmaiolla
Copy link
Owner

@LukeIreland1, last time I investigated this, it was an issue in VS Code. Something changed there and the related functions were not being called when that was closed.
I opened a ticket for them, but it was closed.

@romanmar
Copy link

romanmar commented Aug 24, 2021

@rafaelmaiolla Where did you get up to with this? I want to use VS Code as my Git Editor. Currently works fine for editing files normally, but using rmate -w as Git Editor doesn't send the edit back to the server/ssh session, and just hangs.

I've ended up changing the python version of rmate client, by adding tm_sock.settimeout(60 * 60 * 24) as a kludge to kill rmate after 24 hours.

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

5 participants