mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
fix(magit): projectile-invalidate-cache in wrong buffer
Also prevents projectile prompting in non-projects.
This commit is contained in:
@ -73,9 +73,10 @@ FUNCTION
|
||||
|
||||
;; Since the project likely now contains new files, best we undo the
|
||||
;; projectile cache so it can be regenerated later.
|
||||
(add-hook! 'magit-post-refresh-hook
|
||||
(add-hook! 'magit-refresh-buffer-hook
|
||||
(defun +magit-invalidate-projectile-cache-h ()
|
||||
(projectile-invalidate-cache nil)))
|
||||
(let (projectile-require-project-root)
|
||||
(projectile-invalidate-cache nil))))
|
||||
;; Use a more efficient strategy to auto-revert buffers whose git state has
|
||||
;; changed: refresh the visible buffers immediately...
|
||||
(add-hook 'magit-post-refresh-hook #'+magit-mark-stale-buffers-h)
|
||||
|
Reference in New Issue
Block a user