Fix :mv/:rm/:cp error when projectile-mode is off
This commit is contained in:
parent
b3a9889c53
commit
25dca5fde7
1 changed files with 3 additions and 2 deletions
|
@ -2,11 +2,12 @@
|
||||||
|
|
||||||
(defun +evil--forget-file (old-path &optional new-path)
|
(defun +evil--forget-file (old-path &optional new-path)
|
||||||
"Ensure `recentf', `projectile' and `save-place' forget OLD-PATH."
|
"Ensure `recentf', `projectile' and `save-place' forget OLD-PATH."
|
||||||
(when (fboundp 'recentf-add-file)
|
(when (bound-and-true-p recentf-mode)
|
||||||
(when new-path
|
(when new-path
|
||||||
(recentf-add-file new-path))
|
(recentf-add-file new-path))
|
||||||
(recentf-remove-if-non-kept old-path))
|
(recentf-remove-if-non-kept old-path))
|
||||||
(when (and (projectile-project-p)
|
(when (and projectile-mode
|
||||||
|
(projectile-project-p)
|
||||||
(projectile-file-cached-p old-path (projectile-project-root)))
|
(projectile-file-cached-p old-path (projectile-project-root)))
|
||||||
(projectile-purge-file-from-cache old-path))
|
(projectile-purge-file-from-cache old-path))
|
||||||
(when (bound-and-true-p save-place-mode)
|
(when (bound-and-true-p save-place-mode)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue