> pull request was actually highjacking empty buffers
kassio opened this issue · 5 comments
pull request was actually highjacking empty buffers
What do you mean by this? It was making sure no empty buffer is created. Was it causing any issues for you?
On my flow I don't have this bug
I figured out that its caused when hidden
is set. I guess then the empty buffer preserves. If hidden
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
cal plug#begin($XDG_DATA_HOME.'/nvim/plugins')
Plug 'kassio/neoterm'
cal plug#end()
set hidden
Steps to reproduce
echo foo > foo
nvim foo
:Topen | b# | Topen | ls<cr>
Actual Behavior
The last command ls
shows that besides foo
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 when hidden
is set.
Line 290 in dc94493
Originally posted by @astier in #285 (comment)
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?
It fixes the issue for me. I hope it doesn't break anything else. Thank you very much for your help.