diff options
Diffstat (limited to 'pkg/gui/filetree/file_tree_view_model.go')
-rw-r--r-- | pkg/gui/filetree/file_tree_view_model.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/gui/filetree/file_tree_view_model.go b/pkg/gui/filetree/file_tree_view_model.go index 05cc9cb89..439471b01 100644 --- a/pkg/gui/filetree/file_tree_view_model.go +++ b/pkg/gui/filetree/file_tree_view_model.go @@ -54,6 +54,10 @@ func (self *FileTreeViewModel) GetSelectedItemId() string { } func (self *FileTreeViewModel) GetSelectedItems() ([]*FileNode, int, int) { + if self.Len() == 0 { + return nil, 0, 0 + } + startIdx, endIdx := self.GetSelectionRange() nodes := []*FileNode{} |