Skip to content

Commit

Permalink
Change root with up-dir shortcuts. Fixes jaypei#290
Browse files Browse the repository at this point in the history
Currently the shortcut keys (RET, SPC) do not trigger a change root to the parent directory on the ".." node. To trigger it, you have to move your cursor to the ".." button.

This fix makes the shortcut keys trigger a change root if the path is equal to the parent directory path.
  • Loading branch information
mrspeaker committed Jun 2, 2019
1 parent c2420a4 commit decaf9b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion neotree.el
Original file line number Diff line number Diff line change
Expand Up @@ -1818,7 +1818,8 @@ the directory instead of showing the directory contents."
FULL-PATH is the path of the directory.
ARG is ignored."
(if neo-click-changes-root
(if (or neo-click-changes-root
(equal full-path (neo-path--updir neo-buffer--start-node)))
(neotree-change-root)
(progn
(let ((new-state (neo-buffer--toggle-expand full-path)))
Expand Down

0 comments on commit decaf9b

Please sign in to comment.