Closed theHamsta closed 3 years ago
Oh yeah that was my bad. We changed the actions to make them more consistent. Thanks.
About that off by one issues? You mean the previewer has an issues?
Actually the previewer is correct (it shows the entry that will be selected). But the selection on the left side is marking the wrong entry. It will jump to the entry the previewer was showing while the next entry is selected on the left.
It seems your selection is delayed by one. So you will jump and preview to the previously selected entry.
That seems weird. So it only happens with frames. All other Telescope builtin's don't have that issue?
I can look at it later/tomorrow. I will merge that for now anyway
Also happens with Telescope dap variables
accompanied with a lot of other errors.
I am doing hash code in python this evening so i try to run it and will look for issues. But right now with a simple project everything seems to be working correctly. You are up to date with telescope right?
Yes, the issue occurred when I updated both telescope-dap and telescope today.
Okay i ran into this as well. This evening. Its kinda weird. So i need to debug it. Thanks for reporting
Okay this happens when the lines are like display is really long and we are basically displaying an array. So removing the entry.value in display made it work. (Telescope dap variables). Its super weird that this happens. Frames did work fine for me tho
I gonna checkout older commit and test against them
That also happened pre actions refactor. But doesn't happen when i first wrote it. So i gonna try to find the commit in core that broke things probably
https://github.com/nvim-telescope/telescope.nvim/commit/8783bea06e1e0dfa8dfd4834058923088471d832 Introduced that. But there is another bug before that as well :laughing:
Okay its when we have newlines in the entry.value so doing something like this makes variables work:
diff --git a/lua/telescope/_extensions/dap.lua b/lua/telescope/_extensions/dap.lua
index c724146..1303659 100644
--- a/lua/telescope/_extensions/dap.lua
+++ b/lua/telescope/_extensions/dap.lua
@@ -169,7 +169,7 @@ local variables = function(opts)
return {
value = entry,
ordinal = string.format('%s(%s) = %s', entry.name, entry.type, entry.value),
- display = string.format('%s(%s) = %s', entry.name, entry.type, entry.value),
+ display = string.format('%s(%s) = %s', entry.name, entry.type, entry.value:gsub('\n', '')),
filename = frame.source.path,
lnum = entry.lnum or 1,
col = entry.col or 0,
Is only variables broken? Or something else too. Also i think ordinal shouldn't have entry.value at all. Ordinal is what we are filtering for.
Its already too late for me so i do that fix tomorrow :)
This function wasn't working anymore after the recent refactor.
Also the entry selection now has an offset by one (selection will be one entry before the one you selected). Dunno whether this is a telescope problem.