From aff16e7b7699ebacbdfd3e7c537584d38603819a Mon Sep 17 00:00:00 2001 From: freesource Date: Tue, 28 Aug 2001 08:01:27 +0000 Subject: [PATCH] A bug fix where keywords weren't changing because of the prior effeciency add-on for tr///. --- BootRoot/YardBox.pm | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/BootRoot/YardBox.pm b/BootRoot/YardBox.pm index c50eaa3..4363a12 100644 --- a/BootRoot/YardBox.pm +++ b/BootRoot/YardBox.pm @@ -1193,7 +1193,7 @@ sub search { $submit_b->grab_default; $submit_b->signal_connect( "clicked", sub { my $keywords = $search1->get_text(); - + # rindex if ($search_backwards->active) { @@ -1204,6 +1204,9 @@ sub search { tr/A-Z/a-z/; ($tmp_k = $keywords) =~ tr/A-Z/a-z/; } + if ($tmp_k && $tmp_k ne $keywords) { + ($tmp_k = $keywords) =~ tr/A-Z/a-z/; + } $offset = rindex($tmp_ct, $tmp_k); } @@ -1228,6 +1231,9 @@ sub search { tr/A-Z/a-z/; ($tmp_k = $keywords) =~ tr/A-Z/a-z/; } + if ($tmp_k && $tmp_k ne $keywords) { + ($tmp_k = $keywords) =~ tr/A-Z/a-z/; + } $offset = rindex($tmp_ct, $tmp_k, $offset); } else { @@ -1260,6 +1266,9 @@ sub search { tr/A-Z/a-z/; ($tmp_k = $keywords) =~ tr/A-Z/a-z/; } + if ($tmp_k && $tmp_k ne $keywords) { + ($tmp_k = $keywords) =~ tr/A-Z/a-z/; + } $offset = index($tmp_ct, $tmp_k); } else { @@ -1284,6 +1293,9 @@ sub search { tr/A-Z/a-z/; ($tmp_k = $keywords) =~ tr/A-Z/a-z/; } + if ($tmp_k && $tmp_k ne $keywords) { + ($tmp_k = $keywords) =~ tr/A-Z/a-z/; + } $offset = index($tmp_ct, $tmp_k, $offset); } else {