diff --git a/doc/NERD_tree.txt b/doc/NERD_tree.txt index 13cf130..7c1af28 100644 --- a/doc/NERD_tree.txt +++ b/doc/NERD_tree.txt @@ -344,8 +344,7 @@ Default key: Map option: NERDTreeMapJumpNextSibling Applies to: files and directories. -If a dir node is selected, jump to the next sibling of that node. -If a file node is selected, jump to the next sibling of that nodes parent. +Jump to the next sibling of the selected node. ------------------------------------------------------------------------------ *NERDTree-c-k* @@ -353,8 +352,7 @@ Default key: Map option: NERDTreeMapJumpPrevSibling Applies to: files and directories. -If a dir node is selected, jump to the previous sibling of that node. -If a file node is selected, jump to the previous sibling of that nodes parent. +Jump to the previous sibling of the selected node. ------------------------------------------------------------------------------ *NERDTree-C* diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim index 26d3410..c2c54ba 100644 --- a/plugin/NERD_tree.vim +++ b/plugin/NERD_tree.vim @@ -3001,18 +3001,7 @@ endfunction function! s:JumpToSibling(forward) let currentNode = s:GetSelectedNode() if !empty(currentNode) - - if !currentNode.path.isDirectory - - if a:forward - let sibling = currentNode.parent.FindSibling(1) - else - let sibling = currentNode.parent - endif - - else - let sibling = currentNode.FindSibling(a:forward) - endif + let sibling = currentNode.FindSibling(a:forward) if !empty(sibling) call s:PutCursorOnNode(sibling, 1, 0)