-
Notifications
You must be signed in to change notification settings - Fork 129
Feature/refactor quit if only left #40
base: master
Are you sure you want to change the base?
Feature/refactor quit if only left #40
Conversation
Hmm. I'm kinda used to using |
Only take action when we are in NERDTree window, and no more window with normal buffer open. Before quitting Vim, delete the buffer so that the '0 mark is correctly set to the previous buffer. This avoids NERDTree buffer being the last displayed buffer if Vim fails to quit due to the last file in the argument list has not been edited yet. Then quit as usual, we have autocmd nesting open, so the 'quit' will trigger other plugin window's quiting behavior. If we are quiting Vim, our current buffer is successfully reset to the last file buffer, no need to warry about failure.
Hey, @jistr, I have just updated the whole PR which fixes the problem while closing tabs, now it should be good to go. |
Heya, thanks for all the code submitted lately :) I'll get to it during the weekend hopefully :) |
The new code fixes the closing but I get problems with nerdtree width. Here are my steps:
Then I'm back at the first tab as expected, but now the nerdtree window is very wide and the window for file contents is very narrow. This doesn't happen on current master. |
That's odd, these code is actually already in tagbar, minibufexpl(develop branch), all works as expected, and it is also works in my test environment where only nerdtree and this plugin is loaded. There must be some code in your vimrc that mess it up, where can I find your vimrc file and what nerdtree-tabs setting have you configured? |
I am using a script called vim-reset to develop vim plugins, it could setup an stand alone vim environment where the runtimepath could be configured as disired. |
Sounds like the problem must indeed be with my setup. I'll try to find the problem. |
So I tested with all plugins disabled except for this one and NERDTree, but with my vimrc settings. The problem happens when i have |
Noop, that might be the problem, I will look into it. |
@jistr I was also currently getting the problem of the nerd tree window resizing to most of the screen size after updating a couple days ago. I don't have the |
@sentilesdal Did you try with the very latest master? :) I think the issue has been fixed a few days ago by reverting a commit. See issue #84 |
@jistr, I pulled last week sometime so I'm not sure. I'll try again later tonight after work ;) to cofirm. Thanks! |
Only take action when we are in NERDTree window, and no more
window with normal buffer open.
Before quitting Vim, delete the buffer so that the '0 mark
is correctly set to the previous buffer. This avoids NERDTree
buffer being the last displayed buffer if Vim fails to quit
due to the last file in the argument list has not been edited
yet.
Then quit as usual, we have autocmd nesting open, so the 'quit'
will trigger other plugin window's quiting behavior. If we are
quiting Vim, our current buffer is successfully reset to the
last file buffer, no need to warry about failure.
I see you are a fan of linear commit history and
git cherry-pick
,but
git merge --no-ff
could keep the merge history which is betterI think, just my thought, nothing important.