-
Notifications
You must be signed in to change notification settings - Fork 219
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
fix: winfixbuf/current toggle
bug from #1390
#1408
Conversation
No this will bring back the float + |
And as long as we have this bug, |
BTW you've mentioned the wrong name lol. I have a 3 at the end ;)
|
OK, we are going to have to explain why exactly this difference causes each bug. I'll try out your other fix later.
Oops 😊 |
Prior to winfixbuf, when neo-tree is floating, it was guaranteed that there is at least one ground (non-floating) window where we can send the However, when all ground windows are winfixbuf, we now need to make a new split before placing that buffer, just like the mechanism used for This is why So, why does this happen in the first place and why does bufdelete wrapped inside a Section 1
Section 2
Section 3Since
Section 4At the same time, the operation is also a
After that,
Section 5Do you remember *1: the
This is why there's only a single window left even when we did Why
|
Thanks for the detailed run down @pysan3. As far as I can see, the code in this PR still handles the float + winfixbuf window situation perfectly and creates a split when needed. You may not have noticed that it still has the scheduled buffer delete, it's just that decision on whether or not that buffer should be deleted happens inline instead of being scheduled. I'm going to merge this because it seems to work as is. |
No. It doesn't. You definitely missed something. |
Huh, can you give me a numbered list of instructions how to recreate the bug? |
I didn't say anything about winfixbuf. It is a bug even from before the PR. |
I'm lost. |
@cseickel Please do this and show me a screen record for both your fix and my PR. Sorry to bother your time.
!Don't close this was just a comment, meaning to literally press record.mp4Lazy won't close automatically so there's a difference, but you can see that the new buffer should be created as a new split in the background. |
Yeah, I have the same results when doing that particular test. That is such an oddball thing to do though that it's not worth causing bugs in the normal expected workflow in order to handle this really wacky edge case. |
It is a real bug!! Please read my comment #1408 (comment). |
Honestly, when I read that the first time I was assuming you meant to issue an open split command with a Neotree mapping, because why would anyone actually issue Logic would dictate that if you opened a file explorer, you would open the file from that file explorer. It's hard to imagine why you would open a floating file picker and then manually issue a command to open a file while that floating window is still open. |
As I said here, when there's no ground window available because all are winfixbuf, we need to make a new split before opening the buffer to make a place where the buffer can be opened. This is exactly the same as calling So if Does this make sense?
Now, because the ground window (where So we need to use |
Nope, I don't agree with that at all.
Nope.
Those instructions do make sense, and that actually works fine in regardless, I think #1406 is a good improvement that handles everything so I guess the discussion is resolved. |
Why? You do deal with this problem with
when there's no I think I'm saying the exact same thing? And why do you deal with this case but not for the floating window? I don't agree with this inconsistency. |
I'm sorry I should have explained better. What I meant was that I disagree with the assertion that manually issuing a |
Could you explain the difference? Manual split works -> but neo-tree doesn't may happen but I don't think for the other way around. So manual splitting should be a valid test case. |
I know empirically that it is not the same because during testing of the various states of changes, using Neotree to open a file either normally or in vsplit would work just fine while your Without that evidence though, I know that it opening a file from neotree does not issue a vsplit while the floating window is in focus. It switches to the last used window first then sees if it is usable. If not, it keeps switching windows until it finds one it likes and then issues the command. There are more nuances if the only open window is a neo-tree window that is supposed to be a sidebar. |
This fixes the bug from #1390, but I have not tested it against
winfixbuf
yet. When you get a chance, can you review and test it? Thanks!