diff --git a/pkg/gui/files_panel.go b/pkg/gui/files_panel.go index 77e816d80..7bb071939 100644 --- a/pkg/gui/files_panel.go +++ b/pkg/gui/files_panel.go @@ -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]