Implemented 'ResetSearch' to allow a search to be resetted

Added ResetSearch to the list of bindable actions in keybindings.md
This commit is contained in:
Massimo Mund
2024-06-08 11:08:38 +02:00
parent f4d576b6e0
commit bbf6ec292e
3 changed files with 11 additions and 0 deletions

View File

@@ -1072,6 +1072,15 @@ func (h *BufPane) UnhighlightSearch() bool {
return true
}
// ResetSearch resets the last used search term
func (h *BufPane) ResetSearch() bool {
if h.Buf.LastSearch != "" {
h.Buf.LastSearch = ""
return true
}
return false
}
// FindNext searches forwards for the last used search term
func (h *BufPane) FindNext() bool {
if h.Buf.LastSearch == "" {