-
Notifications
You must be signed in to change notification settings - Fork 172
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
Extra buffer opening with neovim 0.3.0 #417
Comments
@equalsraf Are you still looking at these? A while back you were very quick at replying and now I have two bugs reported and have heard nothing? You okay? You still maintaining this? … |
hi @kierun I'm good, just crazy busy :) thanks for asking. As for the issue. I was able to reproduce this in sh too. And I confirmed it does not happen with neovim alone. To replicate is enough to call nvim-qt with a single file name argument (the file does not need to exist) i.e. bin/nvim-qt --nvim ../../neovim/build/bin/nvim -- -u NONE /tmp/test However this does not cause the same issue
The additional buffer is unnamed which suggests this is not a bug regarding command line arguments. On a side note you can probably remove the |
You're welcome.
Right, so not the shell… Good.
Yup. Done that, all working. Thanks. |
FWIW, until this bug is fixed you can kill the extra empty buffer by putting this
|
If stdin is not a TTY we read it into buffer 1, as text. But if the stdin pipe is empty, Nvim was most likely invoked for some other reason. DWIM: select buffer 2 (if it exists). Example: echo file1 | xargs nvim closes neovim#8560 closes neovim#8561 ref equalsraf/neovim-qt#417
I wouldn't expect nvim-qt to be affected by this, but neovim/neovim#8576 may help with this. If not I don't know what the issue could be. Can someone try that PR? |
Even better, just add it to |
Sorry, pressed the wrong key… |
I managed to fix this (for me) with this extremely simple patch. It seems that for whatever reason the current version neovim doesn't like getting option paramaters passed after files. Neovim-qt was passing arguments that look like
I'm not sure if it's worth opening a pull request for something this small but this does fix the problem. |
@roflcopter4 I just tried your patch and can confirm that this solves the issue. Thank you. |
Thanks @roflcopter4 that fixes it. Totally missed that one, but it does make sense, although I would only expect this to happen when I tried to reproduce this in standalone nvim with other cli options but failed. Maybe this only happens when --embed is in effect.
Please do, I'll be happy to just press the merge button. |
If stdin is not a TTY we read it into buffer 1, as text. But if the stdin pipe is empty, Nvim was most likely invoked for some other reason. DWIM: select buffer 2 (if it exists). Example: echo file1 | xargs nvim closes neovim#8560 closes neovim#8561 ref equalsraf/neovim-qt#417
If stdin is not a TTY we read it into buffer 1, as text. But if the stdin pipe is empty, Nvim was most likely invoked for some other reason. DWIM: select buffer 2 (if it exists). Example: echo file1 | xargs nvim closes neovim#8560 closes neovim#8561 ref equalsraf/neovim-qt#417
This issue still remains on windows, neovim 0.3.1 |
@DrakeXiang this should be fixed in master. |
@equalsraf I've tested right now the latest nightly build (neovim/neovim@5f15788 ) under Windows 10 and it still doesn't work (one has to close the buffer with |
@dumblob can you try the artifact from neovim/neovim#8901 . It works when I tested it. |
@justinmk great, it works now for me with the artifact. Thanks. |
I tested with the latest nightly and this issue doesn't occur anymore. |
Ok closing this, thanks for checking. |
I launch
neovim-qt
via thiszsh
function:I updated to
neovim 0.3.0
and when calling the above, I get a window to open just fine but there are two buffers: an empty one and another buffer the one with the file.The text was updated successfully, but these errors were encountered: