-
Notifications
You must be signed in to change notification settings - Fork 58
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 issue #25 #60
Fix issue #25 #60
Conversation
I'm sorry about the mess i made in this PR, still getting the hang of git and messed up with the |
Thank you for your fix! it looks good. |
I'm not so sure it looks good , but it's the only way I see to accomplish this. |
Yes it's a workaround. but I don't see any other way to fix this issue... |
mmm, i just tried this and get don't get this error but get a new [No Name] buffer, |
I have maybe an idea I will try this weekend. Thanks again for your help |
good , cause I don't, it seems a matter of convincing vim there is no alternate buffer,
|
You will see that I have opened the PR #61 that re-implement the neovim part without Bclose and add comments for every lines. Removing Bclose should make the whole thing easier to reason about since we will not execute its external code anymore. I re-used your idea of switching between the buffers, thanks a lot! |
Since I don't know if I will merge #61, I think this fix is a step in the good direction. I plan to merge it tomorrow. |
don't merge this just yet, take another look at my tab-feature branch, edit: there's still something wrong, it's too late now, |
I think I'm done, have a look at my fork's tab-feature branch, I'm still gonna do some more testing later, |
I learned something today, I couldn't believe we had to do the buffer visiting thing, and was right. |
about using the registers it's awesome! Are you going to update this PR? |
I've spent many hours the last two days making improvements, testing, believing it was solid, only to find that by fixing one thing I had actually broken another or more, now finally I believe it really is solid. edit: just to mention the removal of the |
I have done some more work on it. I had not paid enough attention to what happens when not choosing a file. |
so that mean it will re-open ranger when you switch back to the alternate buffer? I think it should go back to the last edited file... if there is no file the register @# should be empty I guess. Same behaviour if you try to switch to the alternate buffer right after opening a single file with |
Ok that's cool I'll get at it soon. Right now it still does indeed end up back in ranger because I saw fit to follow the behaviour of vim-dirvish, because the user did actually open a (directory)buffer him/herself, therefore it should count as a buffer. But as you say an argument can also be made for not counting it since ranger is quite different in its usage than the netrw or vim-dirvish approach. |
I've made the change as you wish and removed all the debug messages. |
I didn't re-work on this since long time and I don't remember why I didn't merge this PR 3 months ago! so if no objection I'll merge it since it's solving the open issue. |
If you want to pull the work I've done so far you should merge PR #65 not this one, |
Ok so I close this PR and look at #65. |
It remembers the alternate and current file, if ranger 's closed without a file it revisits these buffers.