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

With preview, a supplied expression is not passed to the refresh

Open torypages opened this issue 1 year ago • 1 comments

Debug adapter definition and debug configuration

No response

Debug adapter version

9adbfdca13afbe646d09a8d7a86d5d031fb9c5a5

Steps to Reproduce

run something like :lua require('dap.ui.widgets').preview("word", {listener={'event_continued'}}) where you supply an expression, in this case, word and a listener.

Expected Result

I expect that my supplied expression would be evaluated when the listeners are triggered.

Actual Result

When the trigger runs, vim.fn.expand('<cexpr>') seems to be evaluated.

torypages avatar Feb 20 '24 04:02 torypages

In the preview function adding view.__expression = value in between these two lines "fixes" it.

I suppose maybe we need a way to pass additional arguments to the render inside the refresh here

torypages avatar Feb 20 '24 05:02 torypages