-
-
Notifications
You must be signed in to change notification settings - Fork 117
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
> pull request was actually highjacking empty buffers #294
Comments
Instead of creating a split window, when using that code, on re-opening a neoterm it opened in the current window (hijacking) the current window, instead of creating a split window even when passing a Following the reproduce steps I wasn't able to replicate the error: |
In my case
This is what I get: I saw in your last gif that when you try to open Other than that I really don't know what else could be the difference. I am using @collegeimprovements do you still have this bug? Could you try to reproduce the bug with the instructions I gave above? |
When re-opening a neoterm sometimes it creates a new empty buffer. To avoid that, check for neoterm buffer before falling back to `enew`. Fixes #294.
It fixes the issue for me. I hope it doesn't break anything else. Thank you very much for your help. |
When re-opening a neoterm sometimes it creates a new empty buffer. To avoid that, check for neoterm buffer before falling back to `enew`. Fixes #294.
What do you mean by this? It was making sure no empty buffer is created. Was it causing any issues for you?
I figured out that its caused when
hidden
is set. I guess then the empty buffer preserves. Ifhidden
is not set it gets deleted. Maybe that's the reason why you don't have this bug. I have below some instructions how to reproduce it.Minimal vimrc
Steps to reproduce
echo foo > foo
nvim foo
:Topen | b# | Topen | ls<cr>
Actual Behavior
The last command
ls
shows that besidesfoo
also a second empty buffer with the name[No Name]
exists.Expected Behavior
No empty buffer should be created.
Cause of the Problem
The commit cb685fd makes the function
s:create_window
create a new empty buffer which doesn't get deleted whenhidden
is set.neoterm/autoload/neoterm.vim
Line 290 in dc94493
Originally posted by @astier in #285 (comment)
The text was updated successfully, but these errors were encountered: