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 on yank after jumping #156

Open
jacksonludwig opened this issue Jul 14, 2022 · 1 comment
Open

Error on yank after jumping #156

jacksonludwig opened this issue Jul 14, 2022 · 1 comment

Comments

@jacksonludwig
Copy link

I noticed the following error occur after performing a yank immediately after moving using lightspeed. I have noticed it quite consistently if I jump while in visual mode then yank the selection, however I am still not totally able to always reproduce it.

Error detected while processing TextYankPost Autocommands for "*":
Error executing lua callback: /usr/local/share/nvim/runtime/lua/vim/highlight.lua:63: end_col value outside range
stack traceback:
        [C]: in function 'nvim_buf_set_extmark'
        /usr/local/share/nvim/runtime/lua/vim/highlight.lua:63: in function 'range'
        /usr/local/share/nvim/runtime/lua/vim/highlight.lua:134: in function 'on_yank'
        ...

I have highlight on yank set up this way:

local highlight_group = vim.api.nvim_create_augroup('YankHighlight', { clear = true })
vim.api.nvim_create_autocmd('TextYankPost', {
  callback = function()
    vim.highlight.on_yank()
  end,
  group = highlight_group,
  pattern = '*',
})

This could be an upstream issue, but I have not been reproduce the issue without lightspeed.

@ggandor
Copy link
Owner

ggandor commented Jul 17, 2022

A reproducible example would definitely help a lot...

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