Skip to content

nvim-ufo interferes with cursorline mapping #242

@sainttttt

Description

@sainttttt

Neovim version (nvim -v | head -n1)

NVIM v.0.10.0

Operating system/version

macOS 13.6.1

How to reproduce the issue

I have an autocommand for my CursorLine that gets it to flash when I yank text, and also changes when I enter insert mode. nvim-ufo overrides these settings.

If I remove this code

-            if curLnum == curFoldStart then
-                didHighlight = wses:setCursorFoldedLineHighlight()
-            else
-                didHighlight = wses:clearCursorFoldedLineHighlight()
-            end

from lua/ufo/decorator.lua then it seems to work fine.

These are my autocommands:

augroup yank_text_highlight
  autocmd!
  autocmd InsertEnter * highlight CursorLine guibg=#181010
  autocmd InsertLeave * hi! link CursorLine CursorLineMain
  autocmd TextYankPost * hi! link CursorLine YankText | call timer_start(200, { tid -> execute('hi! link CursorLine CursorLineMain')})
augroup END

Could the functionality of nvim-ufo setting CursorLine be turned off via some option?

Expected behavior

CursorLine mappings remain unaltered

Actual behavior

Cursorline autocommands get overwritten and stop working when I use nvim-ufo

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions