-
-
Notifications
You must be signed in to change notification settings - Fork 826
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cursor position outside buffer
error in pickers.lua
#3163
Comments
Hm.. I'm a little confused about that bit of code to begin with. What's with the double |
Thanks a lot for taking a look!
It's possible, I suppose, that some particular entry causes the error and that large libraries simply increase the chances of having such an entry. I'll try 'bisecting' my library to see if I can find anything (might only get to it tomorrow, it's rather tedious).
No, neither my own config nor the test config in my devShell uses this option. |
@jghauser stack trace is pointing to line
if this has out of bounds issue then try some print statements to check what is the line count in the results buffer. 3rd line in below code should help you print it. Usually its always 250. Could you check if its the same in your case with and without the plugin? You can check the count by looking by running command :messages
|
Thanks for looking into this @sultanahamer! Whenever the error occurs, the line count is 249. EDIT: And otherwise (without my plugin and when my plugin isn't causing any errors) it's 250. EDIT2: I've finally gone through the trouble of trying to pin-point the entry that causes the problem and it really seems to be only 1 or 2 files that cause it. This leads me to think that the problem is with my plugin somewhere. I'll get back to you when I find out more! Thanks a lot for the help so far, it's been very useful! ❤️ |
Ok, I found the error. One of the strings contained a |
Description
I'm the author of the plugin papis.nvim, which implements a Telescope picker. A user has opened a bug report and reported that they get an error when opening the picker. I've now realised that the only reason I wasn't getting the error was because I had
sorting_strategy = "ascending"
in my config. Once I changed that, I also started getting the error. It doesn't always happen when opening the picker -- sometimes I need to type some characters first. The error is:It seems to be triggered by a line that only executes when the
sorting_strategy
isdescending
:telescope.nvim/lua/telescope/pickers.lua
Lines 1469 to 1475 in f12b15e
The error seems related to (at least) the following other bug reports (though it's caused by a different line/file):
cursor position outside buffer
#1727It's of course possible that something is wrong with how I implemented the picker, though I'm at a loss as to how I should further troubleshoot this. I would be very grateful for any pointers!
Neovim version
Operating system and version
Nix unstable
Telescope version / branch / rev
35f94f0
checkhealth telescope
Steps to reproduce
I haven't been able to reliably reproduce the issue unfortunately. It requires installing my plugin, and (as far as I can tell) it only occurs when the picker is used to select from a sufficiently big number of entries (which in this case are bibliographic entries in a research library). In my library of about 1800 entries, the error happens very reliably.
My plugin provides a
flake.nix
with a devShell, where the commandnvim-test
launches a neovim instance with a minimal library (first clone the repo, thennix develop
to enter the devShell). Unfortunately, that also doesn't cause the error as the test library is too small. I'm happy to provide access to my library for troubleshooting or to do whatever on my system to help find out what's going on.Expected behavior
I would expect the picker to open without errors and for no errors to occur when typing to search among entries.
Actual behavior
The error mentioned in the description occurs.
Minimal config
I've tried to get the minimal config to work but ran into a bunch of problems. Nix seems to make installing the
sqlite.lua
dependency difficult with packer. The config that I use to test my plugin is in myflake.nix
here and is quite minimal. I can try to get this to work in a VM if needed, but I thought I'd ask first -- maybe someone knows what's up with the info provided already.The text was updated successfully, but these errors were encountered: