summaryrefslogtreecommitdiffstats
path: root/library/fontchooser.tcl
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-09-14 07:36:16 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-09-14 07:36:16 (GMT)
commit075429fc2cc7afc986bc3839feacf935c89ccbc7 (patch)
tree974fdecf07326f588f07e04256d91c98b2fde350 /library/fontchooser.tcl
parent26d2f8ec042c3a1c076a64a8651aa88294ff6a0f (diff)
downloadtk-075429fc2cc7afc986bc3839feacf935c89ccbc7.zip
tk-075429fc2cc7afc986bc3839feacf935c89ccbc7.tar.gz
tk-075429fc2cc7afc986bc3839feacf935c89ccbc7.tar.bz2
Use consistant $idx < 0 in stead of $idx != -1 for checking index meaning 'not found'
Diffstat (limited to 'library/fontchooser.tcl')
-rw-r--r--library/fontchooser.tcl2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/fontchooser.tcl b/library/fontchooser.tcl
index 9197aea..a9bd706 100644
--- a/library/fontchooser.tcl
+++ b/library/fontchooser.tcl
@@ -384,7 +384,7 @@ proc ::tk::fontchooser::Tracer {var1 var2 op} {
$S(W).l${var}s selection clear 0 end
set n [lsearch -exact $S(${var}s,lcase) $value]
$S(W).l${var}s selection set $n
- if {$n != -1} {
+ if {$n >= 0} {
set S($var) [lindex $S(${var}s) $n]
$S(W).e$var icursor end
$S(W).e$var selection clear