Fixes left arrow navigation for empty filetree ()

This commit is contained in:
Akshay Chhajed 2018-11-29 01:55:16 +05:30 committed by Alex Goodman
parent 929c05aec4
commit 8e6709a93a

@ -260,7 +260,11 @@ func (view *FileTreeView) CursorLeft() error {
var evaluator func(*filetree.FileNode) bool
var dfsCounter, newIndex uint
oldIndex := view.TreeIndex
parentPath := view.getAbsPositionNode().Parent.Path()
currentNode := view.getAbsPositionNode()
if currentNode == nil {
return nil
}
parentPath := currentNode.Parent.Path()
visitor = func(curNode *filetree.FileNode) error {
if strings.Compare(parentPath, curNode.Path()) == 0 {