mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-01-04 03:48:07 +02:00
return nil when no file selected
This commit is contained in:
parent
88d329c52a
commit
08e039bea9
@ -22,7 +22,7 @@ import (
|
||||
func (gui *Gui) getSelectedFile() *commands.File {
|
||||
selectedLine := gui.State.Panels.Files.SelectedLine
|
||||
if selectedLine == -1 {
|
||||
return &commands.File{}
|
||||
return nil
|
||||
}
|
||||
|
||||
return gui.State.Files[selectedLine]
|
||||
|
Loading…
Reference in New Issue
Block a user