Fix exception when finding all in untitled documents

Untitled documents have no path, so we were creating a dictionary with a nil object. The path isn’t actually used (we go via the identifier) so removing the potential path from the dictionary avoids the problem.
This commit is contained in:
Allan Odgaard
2013-06-16 17:44:02 +07:00
parent d71f29074e
commit c04eb1cd2a

View File

@@ -396,7 +396,6 @@ NSString* const FFFindWasTriggeredByEnter = @"FFFindWasTriggeredByEnter";
FFMatch* firstMatch = [matches firstObject];
FFMatch* lastMatch = [matches lastObject];
[documents addObject:@{
@"path" : firstMatch.path,
@"identifier" : [NSString stringWithCxxString:doc->identifier()],
@"firstMatchRange" : [NSString stringWithCxxString:[firstMatch match].range],
@"lastMatchRange" : [NSString stringWithCxxString:[lastMatch match].range],