1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

Add search history

Add search history for filterable and searchable views.
This commit is contained in:
Karim Khaleel
2023-08-04 14:01:30 +03:00
parent ab5875c78f
commit edec116ceb
12 changed files with 270 additions and 8 deletions

View File

@ -0,0 +1,20 @@
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
}