-
Notifications
You must be signed in to change notification settings - Fork 24
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
Navigating/deleting windows in multiple tabs causes errors #183
Comments
Thanks for reaching out! Sounds like there's two issues here, so I'm going to open a separate one for the possible infinite loop - #184 As for the primary issue of the errors, I don't use multiple tabs when I use vim, so that is definitely an under-tested area. I'm not sure when I'll have time to troubleshoot this since I've not had a lot of open-source time lately, but I'll definitely look at this when I get a chance. If you find any more clues or anything in the meantime please do drop it in here. PRs are also very welcome if you are feeling inspired/don't want to wait for me to get around to it 😁 |
Alright, on investigation I think the simplest thing to do is add a new autocmd that clears our cached values when changing a tab. This prevents stale values (that are now totally nonsensical) from causing issues plus forces a refresh. The cache will continue to be used when switching windows or buffers within one tab, but will be flushed every time a tab change happens.
(Other plugin systems will do this in a similar way, see their docs for info) I'll be doing some more testing with this, but I would love for you to try it before it's released to make sure you don't encounter any other issues. |
Closing because I think the CR will address the issue. If not, please reopen. |
Check list
Environment info
Version info
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Jun 22 2023 04:08:04)
Included patches: 1-3995, 4563, 4646, 4774, 4895, 4899, 4901, 4919
Question / Problem and steps to reproduce
Having many tabs and windows open, when deleting the current buffer(not the minimap buffer), sometimes just by quitting window(:q) or in some cases just moving between tabs or windows causes all sorts of different errors.
This one happened when switching tab
Sometimes even when moving cursor inside a file
It wouldn't be so bad if it was only for the errors but sometimes when you have two windows to same buffer, close the other window(:q) it deletes the whole buffer and you may lose some work.
None of this seems to happen if only a single tab open.
Simplest way to produce the first set of errors above is to have two tabs with minimaps open and using :bd on either one.
The other errors I cant produce so consistently since it starts happening just at some point when quickly navigating/deleting windows and tabs.
I absolutely love this plugin and I'd love to start using it without issues in my everyday life.
*Also in autoload/minimap/vim.vim, line 1015:
The
continue
causes infinite loop sometimes again when navigating/deleting windows/tabs if having color search.The text was updated successfully, but these errors were encountered: