Closed kassio closed 4 years ago
What do you mean by this?
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 mod
. Exemple:
Following the reproduce steps I wasn't able to replicate the error:
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 mod
In my case Topen
opens a new terminal in the current window and not in a split-window. But you are right. It breaks reopening a terminal in a vertical split.
Following the reproduce steps I wasn't able to replicate the error
This is what I get:
I saw in your last gif that when you try to open foo
you get some error messages like it couldn't load something. And at the first line in the file foo
there are some red markers. So it seams like its not really a minimal vimrc. If so could you pls repeat it with only the minimal vimrc which I posted above?
Other than that I really don't know what else could be the difference. I am using nvim v0.4.3
and neoterm with the latest commit f4399a0.
@collegeimprovements do you still have this bug? Could you try to reproduce the bug with the instructions I gave above?
@kvalv do you still have this bug? Could you try to reproduce the bug with the instructions I gave above? I am mentioning you because you said that you have the bug in issue #285.
@astier you're right. I was able to replicate. Can you check if https://github.com/kassio/neoterm/pull/300 fixes it, please?
It fixes the issue for me. I hope it doesn't break anything else. Thank you very much for your help.
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.https://github.com/kassio/neoterm/blob/dc94493b581ebef6607e4a2b399adf1003857fd0/autoload/neoterm.vim#L290
Originally posted by @astier in https://github.com/kassio/neoterm/issues/285#issuecomment-663830132