Skip to content

Commit

Permalink
fix: checks if current buffer = config.bufnr before creating autocmd (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
catgoose authored Aug 24, 2023
1 parent c17d321 commit 109f211
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lua/dashboard/theme/doom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ local function generate_center(config)
local bottom = api.nvim_buf_line_count(config.bufnr)
vim.defer_fn(function()
local before = 0
if api.nvim_get_current_buf() ~= config.bufnr then
return
end
api.nvim_create_autocmd('CursorMoved', {
buffer = config.bufnr,
callback = function()
Expand Down

0 comments on commit 109f211

Please sign in to comment.