From: Paul Mackerras Date: Fri, 19 Oct 2007 09:09:43 +0000 (+1000) Subject: gitk: Fix Tcl error: can't unset findcurline X-Git-Tag: v1.5.4-rc0~318^2~1^2~4 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=eb33a67f218b612f6fb1456e19b40a1f97ff02c0;p=git.git gitk: Fix Tcl error: can't unset findcurline 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 --- diff --git a/gitk b/gitk index 290deff7b..3b3cc4bd9 100755 --- a/gitk +++ b/gitk @@ -4279,7 +4279,6 @@ proc findnext {restart} { global findcurline find_dirn if {[info exists find_dirn]} return - set find_dirn 1 if {![info exists findcurline]} { if {$restart} { dofind @@ -4287,6 +4286,7 @@ proc findnext {restart} { bell } } else { + set find_dirn 1 run findmore nowbusy finding } @@ -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 }