Lines Matching refs:Position
387 // Find the byte position of the truncation point.
388 const char *Position = Buffer->getBufferStart();
390 for (; *Position; ++Position) {
391 if (*Position != '\r' && *Position != '\n')
395 if ((Position[1] == '\r' || Position[1] == '\n') &&
396 Position[0] != Position[1])
397 ++Position;
398 ++Position;
403 Position += CompleteColumn - 1;
405 // If pointing inside the preamble, adjust the position at the beginning of
409 if (Position - Buffer->getBufferStart() < SkipMainFilePreamble.first)
410 Position = Buffer->getBufferStart() + SkipMainFilePreamble.first;
413 if (Position > Buffer->getBufferEnd())
414 Position = Buffer->getBufferEnd();
417 CodeCompletionOffset = Position - Buffer->getBufferStart();
423 char *NewPos = std::copy(Buffer->getBufferStart(), Position, NewBuf);
425 std::copy(Position, Buffer->getBufferEnd(), NewPos+1);