Skip to content

Commit

Permalink
Change WinEnter to BufEnter for the cursorline autocmds, to fix this …
Browse files Browse the repository at this point in the history
…issue referenced here camspiers/snap#40
  • Loading branch information
beauwilliams committed Jun 22, 2021
1 parent efac01c commit 48caba1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/modules/autocmd.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ function autocmd.setup(config)

if config.cursorline ~= false then
-- Explicitly check against false, as it not being present should default to it being on
table.insert(autocmds, { 'WinEnter', '*', 'setlocal cursorline' })
table.insert(autocmds, { 'WinLeave', '*', 'setlocal nocursorline' })
table.insert(autocmds, { 'BufEnter', '*', 'setlocal cursorline' })
table.insert(autocmds, { 'BufLeave', '*', 'setlocal nocursorline' })
end

nvim_create_augroups({autocmds})
Expand Down

0 comments on commit 48caba1

Please sign in to comment.