Skip to content
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

Error opening file using telescope extension #14

Open
hellobbn opened this issue Jan 4, 2025 · 2 comments
Open

Error opening file using telescope extension #14

hellobbn opened this issue Jan 4, 2025 · 2 comments

Comments

@hellobbn
Copy link

hellobbn commented Jan 4, 2025

Hi, thanks for this awesome plugin!

I am having a problem where I am having problems with the telescope extension:

E5108: Error executing lua: .../lazy/lspmark.nvim/lua/telescope/_extensions/lspmark.lua:12
3: Invalid buffer id: -1                                                                  
stack traceback:                                                                          
        [C]: in function 'nvim_set_current_buf'                                           
        .../lazy/lspmark.nvim/lua/telescope/_extensions/lspmark.lua:123: in function 'run_
replace_or_original'                                                                      
        ...re/nvim/lazy/telescope.nvim/lua/telescope/actions/mt.lua:65: in function 'key_f
unc'                                                                                      
        ...hare/nvim/lazy/telescope.nvim/lua/telescope/mappings.lua:293: in function <...h
are/nvim/lazy/telescope.nvim/lua/telescope/mappings.lua:292>

Here is how I produce it

  1. cd into a directory that has previously bookmarked some lines of code
  2. Open neovim using nvim command
  3. Invoke telescope lspmark
  4. Select the bookmark
  5. The error appears

And if the file is already open, then another error appears:

E5108: Error executing lua: .../lazy/lspmark.nvim/lua/telescope/_extensions/lspmark.lua:12
4: Column value outside range                                                             
stack traceback:                                                                          
        [C]: in function 'nvim_win_set_cursor'                                            
        .../lazy/lspmark.nvim/lua/telescope/_extensions/lspmark.lua:124: in function 'run_
replace_or_original'                                                                      
        ...re/nvim/lazy/telescope.nvim/lua/telescope/actions/mt.lua:65: in function 'key_f
unc'                                                                                      
        ...hare/nvim/lazy/telescope.nvim/lua/telescope/mappings.lua:293: in function <...h
are/nvim/lazy/telescope.nvim/lua/telescope/mappings.lua:292>

is this the expected behavior?

@cmon1701
Copy link

I can confirm this (both of the two scenarios mentioned).
Please fix, thanks!

@cmon1701
Copy link

cmon1701 commented Jan 13, 2025

The error occurs when pressing return at an entry in telescope.

A workaround is: Press C-q (actions.sent_to_qflist) and then press return at the quickfix list item.
Or even better: Tab (to select) and then M-q (actions.send_selected_to_qflist).
It is also possible to press C-t to open the file in a new tab, C-x in a new horizontal window, C-v in a new vertical window.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants