summaryrefslogtreecommitdiff
path: root/gitk
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2007-10-19 19:09:43 +1000
committerPaul Mackerras <paulus@samba.org>2007-10-19 19:09:43 +1000
commiteb33a67f218b612f6fb1456e19b40a1f97ff02c0 (patch)
tree1e3ca1d31645b47aefd0489542d16c6bfa2863ee /gitk
parent8d73b242a53da9ea36800a8ff0f9993e5100ea24 (diff)
downloadgit-eb33a67f218b612f6fb1456e19b40a1f97ff02c0.tar.gz
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 <paulus@samba.org>
Diffstat (limited to 'gitk')
-rwxr-xr-xgitk4
1 files changed, 2 insertions, 2 deletions
diff --git a/gitk b/gitk
index 290deff7b2..3b3cc4bd93 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
}