diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2021-04-04 23:51:59 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2021-04-06 19:34:32 +1000 |
commit | 4fe512ff3a299102c2bd78bc83b8644582127aae (patch) | |
tree | 5a34eacc1c137a8c98624ba29b757c0a717cf694 /pkg/gui/suggestions_panel.go | |
parent | 4197921465a6cb67d5fdd5b63de653493a5ebd41 (diff) |
test
type safe view access
Diffstat (limited to 'pkg/gui/suggestions_panel.go')
-rw-r--r-- | pkg/gui/suggestions_panel.go | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/pkg/gui/suggestions_panel.go b/pkg/gui/suggestions_panel.go index 84cc89a7f..c11145ded 100644 --- a/pkg/gui/suggestions_panel.go +++ b/pkg/gui/suggestions_panel.go @@ -24,13 +24,8 @@ func (gui *Gui) getSelectedSuggestion() *types.Suggestion { } func (gui *Gui) setSuggestions(suggestions []*types.Suggestion) { - view := gui.getSuggestionsView() - if view == nil { - return - } - gui.State.Suggestions = suggestions gui.State.Panels.Suggestions.SelectedLineIdx = 0 - _ = gui.resetOrigin(view) + _ = gui.resetOrigin(gui.Views.Suggestions) _ = gui.State.Contexts.Suggestions.HandleRender() } |