nvim-cursorline icon indicating copy to clipboard operation
nvim-cursorline copied to clipboard

Bug: Error detected while processing CursorMoved Autocommands for "*"

Open pocco81 opened this issue 4 years ago • 12 comments

Situation

Right after installation I got an error that would reappear whenever I tried to move the cursor

Error Message

image

Environment

Lua: ==> lua-5.3.6 ==> luarocks-3.6.0 NVIM v0.5.0-dev+1233-g82ac44d01 Build type: RelWithDebInfo LuaJIT 2.1.0-beta3 Plugin manager: Packer.nvim

pocco81 avatar Apr 11 '21 22:04 pocco81

I was having this same issue and I discovered it was because I had the following set in my Neovim config which allows me to have a translucent background for my editor.

highlight Normal guibg=NONE ctermbg=NONE

Removing it resolved my issues. It would be nice if there was some way to support this though.

knowler avatar Apr 20 '21 15:04 knowler

I fixed it in #8. Setting CursorLineNr and CursorLine is unnecessary.

Shatur avatar Apr 25 '21 23:04 Shatur

dealing with the same issue

Chaitanyabsprip avatar Apr 27 '21 21:04 Chaitanyabsprip

I don't know because I don't use translucency, but I'm waiting for PR if needed!

ya2s avatar Apr 28 '21 04:04 ya2s

@yamatsum How do I solve this ? I still get this error

VedantParanjape avatar Jun 03 '21 17:06 VedantParanjape

Was having the same issue, setting guibg to #00000 seemed to have fixed it for me

hi Normal ctermbg=NONE guibg=#00000

Terrahop avatar Jun 10 '21 14:06 Terrahop

Was having the same issue, setting guibg to #00000 seemed to have fixed it for me

hi Normal ctermbg=NONE guibg=#00000

didn't help me :( still same complaint:

Error detected while processing CursorMoved Autocommands for "*": E5108: Error executing lua ...fig/nvim/plugged/nvim-cursorline/lua/nvim-cursorline.lua:59: Vim(highlight):E417: missing argument: guibg=

EDIT: actually it started working, i had a require'nvim-cursorline' line and when i removed that and ran :PlugUpdate again it started working, transparency is kept (except for the highlighted line which is okay i guess) but words are underlined and after waiting for a bit the line the cursor is at is highlighted.

ofsaleem avatar Jul 01 '21 18:07 ofsaleem

@Pocco81 @knowler @Shatur @Chaitanyabsprip @VedantParanjape @Terrahop @ofsaleem cursoropt has been merged https://github.com/neovim/neovim/issues/13356#event-5101683629 So I created a branch that takes advantage of this feature (but this requires neovim nightly) https://github.com/yamatsum/nvim-cursorline/tree/nightly Could you please verify if this branch fixes the bug?

ya2s avatar Aug 03 '21 03:08 ya2s

that seems to have fixed it for me, i added my require line back and things broke, switched to nightly nvim-cursorline and no error messages, switched back to main and error messages came back. so seems like it did the trick. using brew's neovim-nightly

ofsaleem avatar Aug 03 '21 15:08 ofsaleem

Hi guys, I have tried this plugin from both main and nightly branch, I'm using Neovim 0.5 on Windows 10 and I still get this issue(regardless of whether I use the "require" function).

The only time it "appears" to work is whenever the theme I use doesn't add some sort of transparency? So, Catpuccino with transparency off works, but Moonlight theme straight out breaks the Neovim ( since I'm on Windows, the GUI is from Qt, although it seems I should change that too...), and that is only with the non-night build, with night build installed my Neovim crashes.

The messages displayed are practically the same as in the original post, so no need to repost the :messages.

Zamachi avatar Sep 19 '21 10:09 Zamachi

@yamatsum was this not fixed in #11? I found the plugin pretty sweet so I added a pull request for a separate issue but I could not reproduce this one.

haras-unicorn avatar Jan 23 '22 17:01 haras-unicorn

I had the same error but from a different cause. In my neovim config I have code that highlights trailing whitespace.

" Highlights trailing whitespace
   highlight ExtraWhitespace ctermbg=red guibg=red
   match ExtraWhitespace /\s\+$/
   autocmd BufWinEnter * match ExtraWhitespace /\s\+$/
   autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
   autocmd InsertLeave * match ExtraWhitespace /\s\+$/
   autocmd BufWinLeave * call clearmatches()

The last line was causing the issue so I have removed it. Whitespace highlight still seems to be working as expected.

autocmd BufWinLeave * call clearmatches()

hyper-jarrod avatar Aug 23 '22 01:08 hyper-jarrod