The logic in stopfinding assumes that findcurline will be set if
find_dirn is, but findnext and findprev can set find_dirn without
setting findcurline. This makes sure we only set find_dirn in those
places if findcurline is already set.
Signed-off-by: Paul Mackerras <paulus@samba.org>
global findcurline find_dirn
if {[info exists find_dirn]} return
- set find_dirn 1
if {![info exists findcurline]} {
if {$restart} {
dofind
bell
}
} else {
+ set find_dirn 1
run findmore
nowbusy finding
}
global findcurline find_dirn
if {[info exists find_dirn]} return
- set find_dirn -1
if {![info exists findcurline]} {
dofind 1
} else {
+ set find_dirn -1
run findmorerev
nowbusy finding
}