Skip to content

Commit

Permalink
fix(buffer): data leak from BufLeave autocmd
Browse files Browse the repository at this point in the history
Now it only runs this autocmd once without creating a new one on each
opening of the `arrow` buffer.
  • Loading branch information
rasulomaroff committed Apr 16, 2024
1 parent a4899d8 commit 591f667
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lua/arrow/buffer_ui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,7 @@ function M.spawn_action_windows(call_buffer, bookmarks, line_nr, col_nr, call_wi
vim.api.nvim_create_autocmd("BufLeave", {
buffer = 0,
desc = "Disable Cursor",
once = true,
callback = function()
vim.cmd("highlight clear Cursor")

Expand Down

0 comments on commit 591f667

Please sign in to comment.