Skip to content

Commit

Permalink
fix: ignore blamer action for file outside git
Browse files Browse the repository at this point in the history
  • Loading branch information
Artawower committed Feb 19, 2022
1 parent 0415429 commit f28be75
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions blamer.el
Original file line number Diff line number Diff line change
Expand Up @@ -767,10 +767,11 @@ will appear after BLAMER-IDLE-TIME. It works only inside git repo"
TYPE - optional parameter, by default will use `overlay-popup'."
(interactive)
(blamer--reset-state)
(blamer--render (or type 'overlay-popup))
(blamer--preserve-state)
(add-hook 'post-command-hook #'blamer--reset-state-once nil t))
(when (blamer--git-exist-p)
(blamer--reset-state)
(blamer--render (or type 'overlay-popup))
(blamer--preserve-state)
(add-hook 'post-command-hook #'blamer--reset-state-once nil t)))

(provide 'blamer)
;;; blamer.el ends here

0 comments on commit f28be75

Please sign in to comment.