Fix neotree root directory button definition

This commit is contained in:
Jessie Hildebrandt 2022-12-30 00:50:57 -05:00
parent a60e943f36
commit 81c2ab75bc

View File

@ -869,15 +869,15 @@
'display `((space :align-to (- right 0 1)))))
'face '(nil)
'follow-link t
'neo-full-path (neo-path--updir node)
'keymap (let ((button-keymap (make-sparse-keymap)))
'neo-full-path (directory-file-name node)
'keymap (let ((button-keymap (copy-keymap neotree-dir-button-keymap)))
(define-key button-keymap [mouse-2] (lambda ()
(interactive)
(neotree-hidden-file-toggle)))
(define-key button-keymap [mouse-3] (lambda ()
(interactive)
(mouse-set-point last-input-event)
(neotree-change-root)))
(neotree-select-up-node)))
button-keymap)
'help-echo "mouse-1: Toggle hidden files\nmouse-3: Move root up one directory")
(neo-buffer--newline-and-begin))