mirror of
https://github.com/git/git.git
synced 2024-11-25 19:04:18 +08:00
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>
This commit is contained in:
parent
8d73b242a5
commit
eb33a67f21
4
gitk
4
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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user