Skip to content

Commit

Permalink
fix: make sure selection highlights are cleared on window closed. (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
A-Lamia authored Aug 11, 2023
1 parent bc9c0d2 commit 027a89f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/ssr.lua
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@ function Ui:open()
self:search()
end,
})
api.nvim_create_autocmd({ "BufDelete", "BufWipeout" }, {
api.nvim_create_autocmd({ "WinClosed" }, {
buffer = self.ui_buf,
callback = function(a)
callback = function()
api.nvim_buf_clear_namespace(self.origin_buf, self.ns, 0, -1)
api.nvim_buf_clear_namespace(self.origin_buf, self.cur_match_ns, 0, -1)
keymap.del("n", "n", { buffer = self.origin_buf })
Expand Down

0 comments on commit 027a89f

Please sign in to comment.