monotone

monotone Commit Details

Date:2008-06-07 00:26:53 (11 years 2 months ago)
Author:Tony Cooper
Branch:net.venge.monotone.contrib.mtn-browse
Commit:ead15ec841b587c47c0110096288c6f5c54b6452
Parents: 949ced02d485ffa53a8714bf1651bbe8abc3a018
Message:Got text searching working properly in both directions.

Changes:
MFindText.pm (1 diff)

File differences

FindText.pm
345345
346346
347347
348
348349
349350
350
351
351352
353
354
355
356
357
358
359
360
361
362
363
364
352365
353
354
355
356
366
367
368
357369
358370
359371
$found = 0;
while (! $done)
{
my $pos;
$line =
$instance->{text_buffer}->get_text($start_iter, $end_iter, TRUE);
if ($line =~ m/$expr/g)
if ($forward)
{
$pos = pos($line) if ($found = scalar($line =~ m/$expr/g));
}
else
{
while ($line =~ m/$expr/g)
{
$pos = pos($line);
$found = 1;
}
}
if ($found)
{
$instance->{match_offset_start} =
$start_iter->get_offset() + pos($line) - length($search_term);
$instance->{match_offset_end} =
$start_iter->get_offset() + pos($line);
$done = $found = 1;
$start_iter->get_offset() + $pos - length($search_term);
$instance->{match_offset_end} = $start_iter->get_offset() + $pos;
$done = 1;
}
else
{

Archive Download the corresponding diff file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status