File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -1074,6 +1074,9 @@ func (h *BufPane) UnhighlightSearch() bool {
10741074
10751075// FindNext searches forwards for the last used search term
10761076func (h * BufPane ) FindNext () bool {
1077+ if h .Buf .LastSearch == "" {
1078+ return false
1079+ }
10771080 // If the cursor is at the start of a selection and we search we want
10781081 // to search from the end of the selection in the case that
10791082 // the selection is a search result in which case we wouldn't move at
@@ -1100,6 +1103,9 @@ func (h *BufPane) FindNext() bool {
11001103
11011104// FindPrevious searches backwards for the last used search term
11021105func (h * BufPane ) FindPrevious () bool {
1106+ if h .Buf .LastSearch == "" {
1107+ return false
1108+ }
11031109 // If the cursor is at the end of a selection and we search we want
11041110 // to search from the beginning of the selection in the case that
11051111 // the selection is a search result in which case we wouldn't move at
You can’t perform that action at this time.
0 commit comments