diff options
author | etienne | 2004-09-03 15:15:47 +0000 |
---|---|---|
committer | etienne | 2004-09-03 15:15:47 +0000 |
commit | b4019a05c5e2141a45d3d7af107ddd97e7ec78e4 (patch) | |
tree | f91b9318fafcb57042d30a6511c1bc911033a07d /src | |
parent | cf88bf0f29ff961406cec31fe00337afd5d7444c (diff) | |
download | ivymon-b4019a05c5e2141a45d3d7af107ddd97e7ec78e4.zip ivymon-b4019a05c5e2141a45d3d7af107ddd97e7ec78e4.tar.gz ivymon-b4019a05c5e2141a45d3d7af107ddd97e7ec78e4.tar.bz2 ivymon-b4019a05c5e2141a45d3d7af107ddd97e7ec78e4.tar.xz |
fixed a bug in search functions (introduced in v1.6)
Diffstat (limited to 'src')
-rwxr-xr-x | src/ivymon | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -1294,7 +1294,8 @@ sub afterUpdatingMessages { sub highlightString { - my ($i1, $i2) = @_; + my ($i1, $i2) = @_; + # hidden data $messagesText->tagConfigure('found', -background => 'sienna', -foreground => 'ivory'); @@ -1730,10 +1731,11 @@ sub searchOnTheFly { $index0 = '0.0'; } &highlightStringOff; - my @searchopts = (-count => \$strlen, -forwards); + my @searchopts = (-hidden, -count => \$strlen, -forwards); push(@searchopts, -nocase) unless ($casesensitiveflag); push(@searchopts, -regexp) if ($regexpflag); my $index = $messagesText->search(@searchopts, $string, $index0); + print "index=$index strlen=$strlen\n"; if ($index) { &highlightStringOff if $searchString and $string eq $searchString; $searchString = $messagesText->get($index, "$index + $strlen chars"); @@ -1751,11 +1753,11 @@ sub searchNext { my $strlen; return unless $string; my $index0 = ($searchIndex) ? "$searchIndex + 1 chars": '0.0'; - my @searchopts = (-count => \$strlen, -forwards); + my @searchopts = (-hidden, -count => \$strlen, -forwards); push(@searchopts, -nocase) unless ($casesensitiveflag); push(@searchopts, -regexp) if ($regexpflag); my $index = $messagesText->search(@searchopts, $string, $index0); - #print "index=$index searchIndex=$searchIndex\n"; + #print "index=$index searchIndex=$searchIndex strlen=$strlen\n"; &highlightStringOff; if ($index) { &highlightString($index, "$index + $strlen chars"); @@ -1779,7 +1781,7 @@ sub searchPrev { return unless $string; #my $index0 = ($searchIndex) ? "$searchIndex - 1 chars": '0.0'; my $index0 = ($searchIndex) ? $searchIndex : '0.0'; - my @searchopts = (-count => \$strlen, -backwards); + my @searchopts = (-hidden, -count => \$strlen, -backwards); push(@searchopts, -nocase) unless ($casesensitiveflag); push(@searchopts, -regexp) if ($regexpflag); my $index = $messagesText->search(@searchopts, $string, $index0); @@ -1810,7 +1812,7 @@ sub searchAll { -foreground => 'ivory'); my $index = '0.0'; my $found = 0; - my @searchopts = (-count => \$strlen, -forwards); + my @searchopts = (-hidden, -count => \$strlen, -forwards); push(@searchopts, -nocase) unless ($casesensitiveflag); push(@searchopts, -regexp) if ($regexpflag); |