Fix treemacs-project-toggle

Avoid error in spacemacs startup buffer
This commit is contained in:
Trapez Breen 2019-08-10 10:50:47 +02:00 committed by smile13241324
parent 3df5b43d28
commit d63ff5c0f2
2 changed files with 3 additions and 1 deletions

View File

@ -2585,6 +2585,8 @@ Other:
~C-x w 0~, ~SPC 0~ and ~M-0~ call the same command (thanks to duianto, Miciah)
- Loaded =treemacs-projectile= key binding ~C-c C-p p~ with Treemacs
(thanks to duianto)
- Handle ~SPC p t~ when =projectile-project-root= is nil (thanks to Trapez
Breen)
**** Typescript
- Call tsfmt with extension of current buffer for TSX formatting
(thanks to Victor Andrée)

View File

@ -14,7 +14,7 @@
(interactive)
(if (eq (treemacs-current-visibility) 'visible)
(delete-window (treemacs-get-local-window))
(let ((path (projectile-project-root))
(let ((path (projectile-ensure-project (projectile-project-root)))
(name (projectile-project-name)))
(unless (treemacs-current-workspace)
(treemacs--find-workspace))