File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1391,12 +1391,12 @@ class CodeCompleteFlow {
1391
1391
unsigned RangeEnd = HeuristicPrefix.Qualifier .begin () - Content.data (),
1392
1392
RangeBegin = RangeEnd;
1393
1393
for (size_t I = 0 ; I < 3 && RangeBegin > 0 ; ++I) {
1394
- auto PrevNL = Content.rfind (' \n ' , RangeBegin - 1 );
1394
+ auto PrevNL = Content.rfind (' \n ' , RangeBegin);
1395
1395
if (PrevNL == StringRef::npos) {
1396
1396
RangeBegin = 0 ;
1397
1397
break ;
1398
1398
}
1399
- RangeBegin = PrevNL + 1 ;
1399
+ RangeBegin = PrevNL;
1400
1400
}
1401
1401
1402
1402
ContextWords = collectWords (Content.slice (RangeBegin, RangeEnd));
Original file line number Diff line number Diff line change @@ -316,9 +316,9 @@ std::vector<std::string> generateProximityURIs(llvm::StringRef URIPath) {
316
316
// FIXME(kbobyrev): Parsing and encoding path to URIs is not necessary and
317
317
// could be optimized.
318
318
Body = llvm::sys::path::parent_path (Body, llvm::sys::path::Style::posix);
319
- URI TokenURI (ParsedURI->scheme (), ParsedURI->authority (), Body);
320
319
if (!Body.empty ())
321
- Result.emplace_back (TokenURI.toString ());
320
+ Result.emplace_back (
321
+ URI (ParsedURI->scheme (), ParsedURI->authority (), Body).toString ());
322
322
}
323
323
return Result;
324
324
}
You can’t perform that action at this time.
0 commit comments