Skip to content

Commit

Permalink
gitk: Fix Tcl error: can't unset findcurline
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paul Mackerras committed Oct 19, 2007
1 parent 8d73b24 commit eb33a67
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gitk
Original file line number Diff line number Diff line change
Expand Up @@ -4279,14 +4279,14 @@ proc findnext {restart} {
global findcurline find_dirn

if {[info exists find_dirn]} return
set find_dirn 1
if {![info exists findcurline]} {
if {$restart} {
dofind
} else {
bell
}
} else {
set find_dirn 1
run findmore
nowbusy finding
}
Expand All @@ -4296,10 +4296,10 @@ proc findprev {} {
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
}
Expand Down

0 comments on commit eb33a67

Please sign in to comment.