Fix treesit-explore-mode (bug#66431)
* lisp/treesit.el (treesit-explore-mode): Reset treesit--explorer-last-node before calling treesit--explorer-refresh, so that in the rare case described in the bug report, the explorer buffer don't show the outdated node.
This commit is contained in:
parent
ee043a2703
commit
491ee428c0
1 changed files with 1 additions and 1 deletions
|
@ -2835,13 +2835,13 @@ window."
|
|||
(treesit--explorer-tree-mode)))
|
||||
(display-buffer treesit--explorer-buffer
|
||||
(cons nil '((inhibit-same-window . t))))
|
||||
(setq-local treesit--explorer-last-node nil)
|
||||
(treesit--explorer-refresh)
|
||||
;; Set up variables and hooks.
|
||||
(add-hook 'post-command-hook
|
||||
#'treesit--explorer-post-command 0 t)
|
||||
(add-hook 'kill-buffer-hook
|
||||
#'treesit--explorer-kill-explorer-buffer 0 t)
|
||||
(setq-local treesit--explorer-last-node nil)
|
||||
;; Tell `desktop-save' to not save explorer buffers.
|
||||
(when (boundp 'desktop-modes-not-to-save)
|
||||
(unless (memq 'treesit--explorer-tree-mode
|
||||
|
|
Loading…
Add table
Reference in a new issue