mirror of
https://github.com/zyedidia/micro.git
synced 2024-09-11 20:17:31 +03:00
Allow action chaining of 'FindNext' and 'FindPrevious'
This commit is contained in:
parent
9eb8782ff2
commit
f4d576b6e0
@ -1074,6 +1074,9 @@ func (h *BufPane) UnhighlightSearch() bool {
|
||||
|
||||
// FindNext searches forwards for the last used search term
|
||||
func (h *BufPane) FindNext() bool {
|
||||
if h.Buf.LastSearch == "" {
|
||||
return false
|
||||
}
|
||||
// If the cursor is at the start of a selection and we search we want
|
||||
// to search from the end of the selection in the case that
|
||||
// the selection is a search result in which case we wouldn't move at
|
||||
@ -1100,6 +1103,9 @@ func (h *BufPane) FindNext() bool {
|
||||
|
||||
// FindPrevious searches backwards for the last used search term
|
||||
func (h *BufPane) FindPrevious() bool {
|
||||
if h.Buf.LastSearch == "" {
|
||||
return false
|
||||
}
|
||||
// If the cursor is at the end of a selection and we search we want
|
||||
// to search from the beginning of the selection in the case that
|
||||
// the selection is a search result in which case we wouldn't move at
|
||||
|
Loading…
Reference in New Issue
Block a user