jbyuki / instant.nvim

collaborative editing in Neovim using built-in capabilities
MIT License
1.29k stars 25 forks source link

Host's buffer gets cleared when client connects #10

Closed rosefromthedead closed 3 years ago

rosefromthedead commented 3 years ago

When a client connects to a session, the host's buffer becomes empty, desyncing them. demonstrated on asciinema using neovim 0.5.0

jbyuki commented 3 years ago

Thank you for the issue. I can reproduce it. This is probably caused because it's trying to open a file which is already opened in another neovim instance. Try changing the current working directory in the second instance.

rosefromthedead commented 3 years ago

I don't think that's the problem, because iirc I found the issue when testing across two separate machines. I will double check though

rosefromthedead commented 3 years ago

In the original recording the neovim instances are already running in two separate working directories ~/work/instant and ~/work/instant2

jbyuki commented 3 years ago

Good point, let me see in more details when I have some spare time.

jbyuki commented 3 years ago

Could you test if it's now working? It was a critical bug. Strange that I didn't see it before.

rosefromthedead commented 3 years ago

It seems to work now - I haven't done extensive testing but I can't reproduce it anymore. Thank you for such a quick fix