Skip to content

Fix : blank window after quitting the dashboard or typing window #21 #55

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ParadoxPD
Copy link

@ParadoxPD ParadoxPD commented Apr 1, 2025

Fixes : #21

@siduck
Copy link
Member

siduck commented Apr 24, 2025

that isnt a good fix. cuz this happens with all plugins that use volt. And only on the lazyvim dashboard idk why

it doesnt happen on nvchads dashboard

@ParadoxPD
Copy link
Author

ParadoxPD commented Apr 24, 2025

Yeah this wasn't a complete fix(more like a hack) , what I basically did is close the window if the buffer gets closed. I looked at the volt code for close it only closes the buffer using nvim_buf_delete but it never deletes the window it is attached to ,is it intended to do so? If yes , I think the bug arises when there is no open buffers other that the one created by volt , and closing the buffer forces it to open a new empty buffer.

Let me test what is different in NVChads dashboard that is preventing the bug

Edit: After looking at the Nvdash code and that of oil.nvim and alpha.nvim, I believe that the bug does not appear in nvchad is because the buffer opening and focus handling in better implemented in it, but other dashboard did not do that . I believe that the only way to fix that will be to change the implementation of volt's close function in some way to accommodate the different ways every plugin handles these buffers.

If you think this can be a valid path to solve it then I can try to research it a bit more and try some generalized solution for volt.

For now I suggest that the close_func property of the close function in volt can be used to give a custom behaviour to typr:

close_func = function()
      for _, win in ipairs(open_windows) do
        if api.nvim_win_is_valid(win) then
          api.nvim_win_close(win, true)
        end
      end
    end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: blank window after quitting the dashboard or typing window
2 participants