mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
Ensure file view length is never returned as -1
This was causing issues when obtaining selected items
This commit is contained in:
@ -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{}
|
||||
|
Reference in New Issue
Block a user