nvim-dap-ui icon indicating copy to clipboard operation
nvim-dap-ui copied to clipboard

Resizing other buffers on close

Open patrickarmengol opened this issue 2 years ago • 9 comments

Forgive me in advance if this issue is not specific to nvim-dap-ui, but it is the only plugin I've observed exhibiting this behavior and I'm not sure how to fix it.

When closing nvim-dap-ui, other buffers are resized to include the area that nvim-dap-ui occupied. This issue is kind of like the opposite of https://github.com/rcarriga/nvim-dap-ui/issues/175

This occurs only on close, not on toggle. It also only seems to affect other plugin panes like neo-tree.nvim, toggleterm.nvim, and aerial.nvim; regular editor buffer splits stay in tact. It affects both horizontal and vertical dimensions.

Passing { reset = true } to open/close does not fix it.

Here are some example screenshots:

screenshot1 screenshot2 screenshot3

patrickarmengol avatar Apr 12 '23 15:04 patrickarmengol

Can you try setting winfixwidth and winfixheight on the neo-tree window?

rcarriga avatar Apr 15 '23 08:04 rcarriga

Can you try setting winfixwidth and winfixheight on the neo-tree window?

No change in behavior.

patrickarmengol avatar Apr 15 '23 23:04 patrickarmengol

Can you try setting winfixwidth and winfixheight on the neo-tree window?

No change in behavior.

Has the problem been solved?

chaozwn avatar Jun 21 '23 15:06 chaozwn

Has the problem been solved?

No, it's still occurring.

patrickarmengol avatar Jun 24 '23 01:06 patrickarmengol

this happens to me too, it happens with every plugin I open on the side, nvim-tree, neotree, neotest summary.

patricio-ferraggi-deel avatar Jun 29 '23 07:06 patricio-ferraggi-deel

Happens with me too

HugoxSaraiva avatar Nov 02 '23 01:11 HugoxSaraiva

Hi @patrickarmengol, can you try doing what was described in #122 ? I think I had the same issue you had, and the config described there solved my issue. Be sure to use the latter code example, because it looks like the first example works when you open the dap ui for the first time, but crashes on the second try.

HugoxSaraiva avatar Nov 04 '23 06:11 HugoxSaraiva

For me at least, the fix described there doesn't work.

I found a partial workarround though: Instead of dapui.open / dapui.close, call dapui.toggle. This somehow fixes the issue.

local dap = require 'dap'
local dapui = require 'dapui'

vim.keymap.set("n", "<F7>", dapui.toggle, { desc = "Debug: See last session result." })

dap.listeners.before.attach.dapui_config = dapui.toggle
dap.listeners.after.event_initialized["dapui_config"] = dapui.toggle
dap.listeners.before.event_terminated["dapui_config"] = dapui.toggle
dap.listeners.before.event_exited["dapui_config"] = dapui.toggle

The drawback is of course, that if you toggle the dapui during a session, you'll, get the ui thrown back at you.

sewbacca avatar Jun 18 '24 23:06 sewbacca

Happens with me too

ixpectus avatar Jul 25 '24 07:07 ixpectus