Floobits / floobits-neovim

Floobits plugin for NeoVim
Apache License 2.0
167 stars 7 forks source link

Multiple issues(simultaneous editing inserts random characters, weird selection issues for the other user) #30

Open eleweek opened 9 years ago

eleweek commented 9 years ago

Hi, I'm sorry I couldn't come up with a better title.

We played with floobits today. I was using neovim on Mac OS X yosemite(you can see .nvimrc in my another bug report: https://github.com/Floobits/floobits-neovim/issues/29) , and the second user was using sublime 3 on windows.

Basically, the problems are a bit difficult to reproduce.

1) When both users are typing, sometimes a random chars are inserted(e.g. an newline)

2) The sublime user reported that I use "too much selection". I wasn't using selection at all! Here is the screenshot: http://imgur.com/nIhkQOK

If both issues aren't known, I can record a screencast for you.

btipling commented 9 years ago

Thanks for filing this, sorry for replying late. I'll look into these.

jessesherlock commented 9 years ago

I'm having the same issue. Random newlines, garbled text, weird selections.

It was happening between nvim and sublime, but I have IntelliJ Idea, sublime and nvim installed on my machine so I did a bunch of tests.

edit: I can still reproduce it with an empty .rc file so it's not a plugin interaction or any setting edit2: I'm not sure if it's an issue with neovim and sublime or just neovim. neovim and sublime are guaranteed to be unusable for me.

One clue may be that it seems to always start by adding a newline right after the first character typed and then just mangling all lines around it in interesting ways.

alexozer commented 7 years ago

Hi

I still experience this, anything that can be done?

btipling commented 7 years ago

What are the issues you see specifically @alexozer? Do you have reproducible steps? Would be interested in solving this if you're still running into this issue. Thank you!

alexozer commented 7 years ago

@btipling Sorry, I was only able to test it with two people just now.

So, we both run Arch Linux (so currently neovim 0.1.7), Both of our vim configs are minimal:

if !has('nvim')
    set nocompatible
endif

" Plug {{{ 
call plug#begin('~/.vim/plugged')
Plug 'floobits/floobits-neovim'
call plug#end()

After connecting with FlooJoinWorkspace, we experience similar problems to @eleweek. When typing at the same time, our cursors sometimes jump backwards within the same line, and sometimes if we enter newlines in our text our cursors with jump to random places around the document. This only occurs when we type simultaneously.

btipling commented 7 years ago

Thank you for more information. @alexozer how much text is in your file? Is it a mostly empty file? You guys are both trying to edit the same line of code at once within a few characters of each other?

alexozer commented 7 years ago

@btipling sorry for the ambiguity, we were editing a mostly-empty file, each however editing separate lines 1-2 lines apart from each other.

btipling commented 7 years ago

I believe there are known issues when there are very few bytes in a file. Editing such a tiny file seems to be something people do when they're testing out floobits, but usually in real work there's not a lot of value in two people writing over each other in a small file. Assuming you were just testing, I'd recommend trying it with something that resembles real world work. Try collaborating on a normal project. Until this issue is fixed and you really need to collaborate in a small file I would try to just let one person make the changes in that file.

@ggreer can speak to the details of the problem, but it's not so much about lines, but the number of bytes between multiple different user edits.