mfussenegger / nvim-dap

Debug Adapter Protocol client implementation for Neovim
GNU General Public License v3.0
5.65k stars 205 forks source link

Handle disassembly buffer #1315

Closed bogdan-nikitin closed 3 months ago

bogdan-nikitin commented 3 months ago

Fix https://github.com/mfussenegger/nvim-dap/issues/956#issuecomment-1584883229

The disassembly buffer is of the "nofile" type, which has not been handled. This leads to the error "cursor position outside the buffer" when more than two panes opened.

This error can be reproduced using this Dockerfile:

  1. Run container interactively. Neovim opens with an example file with a breakpoint set
  2. Type :DapContinue
  3. Type :DapStepInto few times
  4. Assembly will appear in both panes
mfussenegger commented 3 months ago

Thanks for the PR but this fix would have the side effect that if you're stepping from any other window with a nofile buffer (like variables window) it would switch the buffer in that window. That's not expected for uselast.

bogdan-nikitin commented 3 months ago

Now I'm handling the disassembly buffer by checking the Vim variable b:dap_source_buf

mfussenegger commented 3 months ago

Now I'm handling the disassembly buffer by checking the Vim variable b:dap_source_buf

Thanks