Skip to content

Error on yank after jumping #156

Open
@jacksonludwig

Description

@jacksonludwig

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions