diff --git a/lisp/treesit.el b/lisp/treesit.el index d788edf7ffc..2887521110b 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el @@ -3601,7 +3601,7 @@ window." ;; Turn off explore mode. (remove-hook 'post-command-hook #'treesit--explorer-post-command t) - (remove-hook 'post-command-hook + (remove-hook 'kill-buffer-hook #'treesit--explorer-kill-explorer-buffer t) (treesit--explorer-kill-explorer-buffer)))