mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-01-10 04:07:18 +02:00
da3b0bf7c8
switch to other fuzzy package with no dependencies
23 lines
501 B
Go
23 lines
501 B
Go
package gui
|
|
|
|
func (gui *Gui) getSelectedSuggestion() string {
|
|
selectedLine := gui.State.Panels.Suggestions.SelectedLineIdx
|
|
if selectedLine == -1 {
|
|
return ""
|
|
}
|
|
|
|
return gui.State.Suggestions[selectedLine]
|
|
}
|
|
|
|
func (gui *Gui) setSuggestions(suggestions []string) {
|
|
view := gui.getSuggestionsView()
|
|
if view == nil {
|
|
return
|
|
}
|
|
|
|
gui.State.Suggestions = suggestions
|
|
gui.State.Panels.Suggestions.SelectedLineIdx = 0
|
|
_ = gui.resetOrigin(view)
|
|
_ = gui.Contexts.Suggestions.Context.HandleRender()
|
|
}
|