Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

improve support for UTF-8 accented characters

  • Loading branch information...
commit b578cf0c5cd2a9e9f2c544861df292baafbf50e4 1 parent 5549ec7
@protocool authored
View
5 bundle_extras/ackmate_ack.autogenerated
@@ -11,6 +11,8 @@
use warnings;
use strict;
+use Unicode::Normalize;
+use Encode;
our $VERSION = '1.92-ackmate';
# Check http://betterthangrep.com/ for updates
@@ -1418,6 +1420,7 @@ sub get_command_line_options {
}
if ( $opt{ackmate} ) {
+ $opt{regex} = Unicode::Normalize::NFC($opt{regex});
$opt{color} = 0;
$opt{heading} = 1;
$opt{break} = 0;
@@ -2604,7 +2607,7 @@ sub needs_line_scan {
App::Ack::warn( "$self->{filename}: $!" );
return 1;
}
- return 0 unless $rc && ( $rc == $size );
+ return 0 unless $rc && ( $rc == $size || length(Encode::encode_utf8($buffer)) == $size );
my $regex = $opt->{regex};
return $buffer =~ /$regex/m;
View
2  source/controllers/JPAckProcess.m
@@ -57,7 +57,7 @@ - (void)invokeWithTerm:(NSString*)term path:(NSString*)path searchFolder:(NSStri
[self.ackTask setCurrentDirectoryPath:path];
[self.ackTask setLaunchPath:@"/usr/bin/env"];
- NSMutableArray* args = [NSMutableArray arrayWithObjects:@"perl", ackmateAck, @"--ackmate", nil];
+ NSMutableArray* args = [NSMutableArray arrayWithObjects:@"perl", @"-CADS", ackmateAck, @"--ackmate", nil];
if (literal) [args addObject:@"--literal"];
if (words) [args addObject:@"--word-regexp"];
Please sign in to comment.
Something went wrong with that request. Please try again.