mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-01-06 03:53:59 +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 {
|
func (gui *Gui) getSelectedFile() *commands.File {
|
||||||
selectedLine := gui.State.Panels.Files.SelectedLine
|
selectedLine := gui.State.Panels.Files.SelectedLine
|
||||||
if selectedLine == -1 {
|
if selectedLine == -1 {
|
||||||
return &commands.File{}
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
return gui.State.Files[selectedLine]
|
return gui.State.Files[selectedLine]
|
||||||
|
Loading…
Reference in New Issue
Block a user