Пример #1
0
// Store the search term on the editor instance.
// This allows us to use it later in other commands.
func storeSearchTerm(e *editor.Editor, term string) {
	// don't do anything if no term is given
	if term == "" {
		return
	}
	e.LastSearchTerm = term
	e.ActiveView().SetHighlightBytes([]byte(term))
}