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

Custom Entries Error after 'get-selected' api #1988

Open
smsjr opened this issue Jul 15, 2024 · 8 comments
Open

Custom Entries Error after 'get-selected' api #1988

smsjr opened this issue Jul 15, 2024 · 8 comments

Comments

@smsjr
Copy link

smsjr commented Jul 15, 2024

After last commit (e1757ae), I'm getting the following error when trying to select suggestions (through TAB, <C-n> or arrows):

E5108: Error executing lua: .../nvim/lazy/nvim-cmp/lua/cmp/view/custom_entries_view.lua:328: attempt to perform arithmetic on local 'cursor' (a nil value)
stack traceback:
	.../nvim/lazy/nvim-cmp/lua/cmp/view/custom_entries_view.lua:328: in function 'select_next_item'
	...e/smsjr/.local/share/nvim/lazy/nvim-cmp/lua/cmp/view.lua:224: in function 'select_next_item'
	...e/smsjr/.local/share/nvim/lazy/nvim-cmp/lua/cmp/init.lua:146: in function 'select_next_item'
	/home/smsjr/.config/nvim/lua/plugins/config/cmp.lua:195: in function 'on_keymap'
	...e/smsjr/.local/share/nvim/lazy/nvim-cmp/lua/cmp/core.lua:145: in function 'callback'
	....local/share/nvim/lazy/nvim-cmp/lua/cmp/utils/keymap.lua:133: in function <....local/share/nvim/lazy/nvim-cmp/lua/cmp/utils/keymap.lua:127>

I've already tried updating custom entries configs (following the Wiki), but also unsuccessful.

@gazsp
Copy link

gazsp commented Jul 15, 2024

Just got this as well.

@sjclayton
Copy link

Culprit is here --> #1986

@thesantatitan
Copy link

pushed a fix #1989

@miguelsrmv
Copy link

I have that too.

@Shougo
Copy link

Shougo commented Jul 16, 2024

Please test this.

#1993

@barreiroleo
Copy link

Meanwhile reverting e1757ae locally worked for me

hmgle added a commit to hmgle/nvim that referenced this issue Jul 16, 2024
@sjclayton
Copy link

#1993 solved this issue for me.

@Shougo
Copy link

Shougo commented Jul 16, 2024

It should be closed.

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

Successfully merging a pull request may close this issue.

7 participants