1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-12-10 11:10:18 +02:00
lazygit/pkg/gui/context/history_trait.go

21 lines
443 B
Go
Raw Normal View History

package context
import (
"github.com/jesseduffield/lazygit/pkg/utils"
)
// Maintains a list of strings that have previously been searched/filtered for
type SearchHistory struct {
history *utils.HistoryBuffer[string]
}
func NewSearchHistory() *SearchHistory {
return &SearchHistory{
history: utils.NewHistoryBuffer[string](1000),
}
}
func (self *SearchHistory) GetSearchHistory() *utils.HistoryBuffer[string] {
return self.history
}