         (setq r-path (expand-file-name r-path current-dir))
         r-path)))
 
+(defun neo-path--shorten (path length)
+  "Shorten a given path to a specified length. This is needed for paths, which
+are to long for the window to display completely. The function cuts of the
+first part of the path to remain the last folder (the current one)."
+    (if (> (string-width path) length)
+	(concat "«" (substring path (- (- length 1))))
+      path))
+
 (defun neo-path--updir (path)
   (let ((r-path (neo-path--expand-name path)))
     (if (and (> (length r-path) 0)

                 'neo-full-path (neo-path--updir neo-buffer--start-node))
  (insert " (up a dir)")
  (neo-buffer--newline-and-begin)
  (neo-buffer--insert-with-face node
                        'neo-header-face)
  (neo-buffer--newline-and-begin))


  (if (and (boundp 'linum-mode)         ; disable line number
           (not (null linum-mode)))
      (linum-mode -1))
  (setq truncate-lines -1)
  (setf neo-global--window (get-buffer-window))
  (neo-window--set-width neo-width)
  (set-window-dedicated-p neo-global--window t)
