Skip to content

Conversation

@rosstang
Copy link
Contributor

When there are multiple number of windows (non-components), all other will be closed except the first one. However the windows returned from vim.api.nvim_tabpage_list_wins is not in a meaningful order. So the layout of neovim can be messed up after diff is created.

The fix here is to sort the win list, and it is most likely that the windows with the minimum handle value is the main editor (so the splitting should be done there).

be closed. It is usually the main editinig window. When there is no
window, make sure cur_win is defined

Signed-off-by: Ross Tang <ph.tchaa@gmail.com>
Signed-off-by: Ross Tang <ph.tchaa@gmail.com>
@ldelossa
Copy link
Owner

ldelossa commented Oct 6, 2023

Hey @rosstang - sorry took a bit of a hiatus from this project.

If you still want to explore this can you rebase the PR and I'll give it a try?

TBH, I don't suggest using nvim-ide while nvim-dap ui is active, they both are pretty heavy handled about controlling windows. Making them both work nicely may just be one hack after the next, but if this is a simple fix that doesn't break anything else, I'm open to it.

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.

2 participants