Hint at ^P and ^N after finding

This commit is contained in:
aerth 2016-05-06 02:52:51 -07:00
parent 87d9221a73
commit 5baf2e226d
No known key found for this signature in database
GPG key ID: EBC461F686385D5C
2 changed files with 7 additions and 3 deletions

View file

@ -667,7 +667,7 @@ func (v *View) FindNext() bool {
} else {
searchStart = ToCharPos(v.cursor.x, v.cursor.y, v.buf)
}
messenger.Message("Find: " + lastSearch)
messenger.Message("Finding: " + lastSearch)
Search(lastSearch, v, true)
return true
}
@ -679,7 +679,7 @@ func (v *View) FindPrevious() bool {
} else {
searchStart = ToCharPos(v.cursor.x, v.cursor.y, v.buf)
}
messenger.Message("Find: " + lastSearch)
messenger.Message("Finding: " + lastSearch)
Search(lastSearch, v, false)
return true
}

View file

@ -1,8 +1,9 @@
package main
import (
"github.com/zyedidia/tcell"
"regexp"
"github.com/zyedidia/tcell"
)
var (
@ -29,6 +30,9 @@ func EndSearch() {
messenger.hasPrompt = false
messenger.Clear()
messenger.Reset()
if lastSearch != "" {
messenger.Message("^P Previous ^N Next")
}
}
// HandleSearchEvent takes an event and a view and will do a real time match from the messenger's output