package core type SearchState struct { Query string Forword bool Cursor int // History is editor wide History []string HistoryCursor int } func NewSearchState() SearchState { return SearchState{ Query: "", Forword: true, Cursor: 0, History: []string{}, HistoryCursor: 0, } }