mirror of
https://github.com/walles/moar.git
synced 2024-09-17 15:07:11 +03:00
Reset search on new '/'
This commit is contained in:
parent
0646c58a5f
commit
9693c91aac
@ -120,6 +120,7 @@ func (p *_Pager) _UpdateSearchPattern() {
|
||||
}
|
||||
|
||||
defer p._ScrollToSearchHits()
|
||||
// FIXME: Indicate to user if we didn't find anything
|
||||
|
||||
pattern, err := regexp.Compile(p.searchString)
|
||||
if err == nil {
|
||||
@ -236,6 +237,8 @@ func (p *_Pager) _OnRune(logger *log.Logger, char rune) {
|
||||
|
||||
case '/':
|
||||
p.isSearching = true
|
||||
p.searchString = ""
|
||||
p.searchPattern = nil
|
||||
|
||||
default:
|
||||
logger.Printf("Unhandled rune keyress '%s'", string(char))
|
||||
|
Loading…
Reference in New Issue
Block a user