diff options
-rw-r--r-- | lisp/km-magit.el | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lisp/km-magit.el b/lisp/km-magit.el index 56921e6..b64765e 100644 --- a/lisp/km-magit.el +++ b/lisp/km-magit.el @@ -452,10 +452,14 @@ argument." This only affects the current buffer and is useful if you do not show tags by default." (interactive) - (if (memq 'magit-insert-tags magit-refs-sections-hook) - (remove-hook 'magit-refs-sections-hook 'magit-insert-tags t) - (add-hook 'magit-refs-sections-hook 'magit-insert-tags t t)) - (magit-refresh-buffer)) + (let ((pos (point))) + (if (memq 'magit-insert-tags magit-refs-sections-hook) + (kill-local-variable 'magit-refs-sections-hook) + (setq-local magit-refs-sections-hook + (append magit-refs-sections-hook + '(magit-insert-tags)))) + (magit-refresh-buffer) + (goto-char pos))) (defun km/magit-revision-insert-related-refs () (interactive) |