Skip to content

Commit

Permalink
Fix warnings #424
Browse files Browse the repository at this point in the history
  • Loading branch information
JugglerShu committed Sep 2, 2013
1 parent acdfca2 commit fe625ea
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions XVim.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.6;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
};
name = Debug;
};
Expand All @@ -715,6 +716,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.6;
SDKROOT = macosx;
};
name = Release;
};
Expand Down
2 changes: 1 addition & 1 deletion XVim/XVimNormalEvaluator.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//
/a/
// XVimNormalEvaluator.m
// XVim
//
Expand Down
8 changes: 4 additions & 4 deletions XVim/XVimSearch.m
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,14 @@ - (NSRange)searchForwardFrom:(NSUInteger)from inWindow:(XVimWindow*)window
// search text beyond the search_base
if( [[srcView string] length]-1 > search_base){
found = [regex rangeOfFirstMatchInString:[srcView string]
options:r_opts
options:0
range:NSMakeRange(search_base+1, [[srcView string] length] - search_base - 1)];
}

// if wrapscan is on, wrap to the top and search
if (found.location == NSNotFound && options.wrapscan== TRUE) {
found = [regex rangeOfFirstMatchInString:[srcView string]
options:r_opts
options:0
range:NSMakeRange(0, [[srcView string] length])];
[window errorMessage:[NSString stringWithFormat:
@"Search wrapped for '%@'",self.lastSearchDisplayString] ringBell:TRUE];
Expand Down Expand Up @@ -200,7 +200,7 @@ - (NSRange)searchBackwardFrom:(NSUInteger)from inWindow:(XVimWindow*)window
}

NSArray* matches = [regex matchesInString:[srcView string]
options:r_opts
options:0
range:NSMakeRange(0, [[srcView string] length]-1)];

// search above base
Expand Down Expand Up @@ -359,7 +359,7 @@ - (NSRange)replaceForwardFrom:(NSUInteger)from to:(NSUInteger)to inWindow:(XVimW
}

// search text beyond the search_base
found = [regex rangeOfFirstMatchInString:[srcView string] options:r_opts range:NSMakeRange(from, [[srcView string] length] - from)];
found = [regex rangeOfFirstMatchInString:[srcView string] options:0 range:NSMakeRange(from, [[srcView string] length] - from)];

if( found.location >= to) {
return NSMakeRange(NSNotFound, 0);
Expand Down

0 comments on commit fe625ea

Please sign in to comment.