Open goldfita opened 2 years ago
Sorry, I do not undersand this issue.
Maybe this is a dap-ui issue. Normally the ui-controls are placed over the Emacs toolbar. But when you remove the toolbar, it places the ui-controls inside the buffer, over the text, as you can see from the image.
(posframe-show dap-ui--control-buffer
:string content
:poshandler #'posframe-poshandler-frame-top-center
:internal-border-width 8)
Really this is a limitation of Emacs. Most modern UIs have dockable windows, so you can make sure things stay where you put them.
Normally the ui-controls are placed over the Emacs toolbar. But when you remove the toolbar, , it places the ui-controls inside the buffer
This seem to be expected behavior,
you can try refposhandler argument, but I don't think it is a good idea
(posframe-show "test"
:string "hello world"
:poshandler #'posframe-poshandler-frame-top-center
:internal-border-width 8
:refposhandler (lambda (frame) (cons 0 0))
)
Dap is using top-center to place the ui-controls. This places the controls over the toolbar, which makes sense to me, as long as there aren't already buttons there. But if you remove the toolbar, the controls end up in the buffer. I moved it left in scratch, to make it obvious. Whether it should be in the buffer or over the toolbar, the behavior should probably be consistent. Maybe check the toolbar before placing??
https://github.com/emacs-lsp/dap-mode/blob/master/dap-ui.el