Ticket #875: acki.patch

File acki.patch, 757 bytes (added by karl.forner, 4 years ago)
  • Padre/lib/Padre/Wx/Ack.pm

    old new  
    244244        $opts{l} = $opts{v} = 1; 
    245245    } 
    246246 
     247    # karl: borrowed this from ack hoping that will fix the ignore-case bug 
     248    my $file_matching = $opts{f} || $opts{lines}; 
     249    if ( !$file_matching ) { 
     250        $opts{regex} = App::Ack::build_regex( $opts{regex} , \%opts ); 
     251    } 
     252 
     253    # check that all regexes do compile fine 
     254    eval { App::Ack::check_regex( $opts{regex} ) }; 
     255    if ($@) { 
     256        $main->error("Find in Files: error in regex " . $opts{regex}); 
     257        return; 
     258    } 
     259 
     260 
    247261    my $what = App::Ack::get_starting_points( [ $search->{dir} ], \%opts ); 
    248262    $iter = App::Ack::get_iterator( $what, \%opts ); 
    249263    App::Ack::filetype_setup();