Commit 2cabdd8d authored by David El-baze's avatar David El-baze

Add Feature: Show unsaved file.

parent 75d8e868
......@@ -1028,7 +1028,8 @@ Like Python's os.path.join,
"Base file/directory name by FILE.
Taken from http://lists.gnu.org/archive/html/emacs-devel/2011-01/msg01238.html"
(or (if (string= file "/") "/")
(neo-util--make-printable-string (file-name-nondirectory (directory-file-name file)))))
(if (member file (neo-get-unsaved-buffers-from-projectile)) (concat (neo-util--make-printable-string (file-name-nondirectory (directory-file-name file))) " *" )
(neo-util--make-printable-string (file-name-nondirectory (directory-file-name file))))))
(defun neo-path--file-truename (path)
(let ((rlt (file-truename path)))
......@@ -1152,6 +1153,19 @@ Return nil if DIR is not an existing directory."
(neo-util--filter
(lambda (x) (not (null (string-match-p x shortname))))
neo-hidden-regexp-list)))
(defun neo-get-unsaved-buffers-from-projectile ()
"Return list of unsaved buffers from projectile buffers."
(interactive)
(let ((rlist '()))
; (when (boundp 'projectile-project-buffers)
(dolist (buf (projectile-project-buffers))
(with-current-buffer buf
(if (and (buffer-modified-p) buffer-file-name)
(setq rlist (cons (buffer-file-name) rlist))
)));)
rlist))
;;
;; Buffer methods
;;
......@@ -1702,7 +1716,6 @@ NeoTree buffer is BUFFER."
"Return non-nil when the NeoTree window is minimize."
(<= (window-width) neo-window-width))
;;
;; Interactive functions
;;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment