diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-17 19:24:22 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-23 14:29:18 +1000 |
commit | 08e039bea9c169d6ff53b2a10e042d30033bc6bc (patch) | |
tree | 3770904362dd7e58d971baaa1cb3ae9f736d5112 /pkg/gui/files_panel.go | |
parent | 88d329c52a9c42fa9abf623d236eee11d5877346 (diff) |
return nil when no file selected
Diffstat (limited to 'pkg/gui/files_panel.go')
-rw-r--r-- | pkg/gui/files_panel.go | 2 |
1 files changed, 1 insertions, 1 deletions
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] |