diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-20 08:53:10 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-23 14:29:18 +1000 |
commit | 146722beb875d6f44a9d05b289e1cf92e8518932 (patch) | |
tree | 2694b571bcce5d1e2a1fa83815abd8d4682894aa /pkg/gui/files_panel.go | |
parent | eb5e54e9fd649e556d8c639ff87fedbfe02ff8e9 (diff) |
rename to SelectedLineIdx
Diffstat (limited to 'pkg/gui/files_panel.go')
-rw-r--r-- | pkg/gui/files_panel.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/gui/files_panel.go b/pkg/gui/files_panel.go index 929f54f6b..28c52fcea 100644 --- a/pkg/gui/files_panel.go +++ b/pkg/gui/files_panel.go @@ -19,7 +19,7 @@ import ( // list panel functions func (gui *Gui) getSelectedFile() *commands.File { - selectedLine := gui.State.Panels.Files.SelectedLine + selectedLine := gui.State.Panels.Files.SelectedLineIdx if selectedLine == -1 { return nil } @@ -28,7 +28,7 @@ func (gui *Gui) getSelectedFile() *commands.File { } func (gui *Gui) selectFile(alreadySelected bool) error { - gui.getFilesView().FocusPoint(0, gui.State.Panels.Files.SelectedLine) + gui.getFilesView().FocusPoint(0, gui.State.Panels.Files.SelectedLineIdx) file := gui.getSelectedFile() if file == nil { @@ -415,7 +415,7 @@ func (gui *Gui) refreshStateFiles() error { // let's try to find our file again and move the cursor to that for idx, f := range gui.State.Files { if selectedFile != nil && f.Matches(selectedFile) { - gui.State.Panels.Files.SelectedLine = idx + gui.State.Panels.Files.SelectedLineIdx = idx break } } |