-
Notifications
You must be signed in to change notification settings - Fork 9
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
Untint forcibly closed windows #41
Conversation
@levouh just gave this a try and don't think it made a difference as far as I can tell 🤔 |
Sounds good @akinsho, I will do some actual testing later when I can. I imagine it is an issue with the second commit, but I'll double check. |
@akinsho it fails for me on
Can you try with the "minimal reproduction" configuration above and verify? Hard to accommodate for anything outside of the minimal case in terms of fixing stuff, unless the culprit is something else obvious. The way the above is setup, it will just operate in |
@levouh so I tried out the minimal init as well as my local config and could confirm that the PR works. The reason I couldn't get it to work in the first place with my config is that I use a The function looks like window_ignore_function = function(win_id)
local win, buf = vim.wo[win_id], vim.bo[vim.api.nvim_win_get_buf(win_id)]
if win.diff or not as.empty(fn.win_gettype(win_id)) then return true end
local ignore_bt = { terminal = true, prompt = true, nofile = true }
local ignore_ft = {
['neo-tree'] = true,
['toggleterm'] = true,
['qf'] = true,
}
local has_bt, has_ft = ignore_bt[buf.buftype], ignore_ft[buf.filetype]
return has_bt or has_ft
end, I'm not sure when this window ignore function runs or how it works but it seems to stop tinting from being cancelled when leaving the neo-tree window as well as the original bug |
I'm experiencing the same with neotest. FWIW I'm not sure this is something tint.nvim should try to work around, but instead these plugins should be closing windows "properly". I was able to locate the issue with neotest, it seems to boil down to the fact that they force delete the floating buffer in a I believe the better option would be to utilize the |
@akinsho @williamboman many months later - 😄 You guy see any reason to not merge this (beyond needing to fix some formatting/linting stuff)? I'm not sure if you guys actively use this branch (or even plugin anymore), but I have not run into any issues with this branch as my primary. I agree generally about plugins needing to fix how they are closing windows, but I imagine it is largely just easier to try to handle things "appropriately" (within reason) here. |
@levouh I do still run into a lot of issues with window remaining tinted, I've sort of gotten used to it now. I think it makes sense to patch it here as much as it's possible. I've only tested this branch just now but it already fixes one of the most occurring issues I'm having, so that's nice 👍 |
Closing this, see #48 for an updated version. |
Fix #38