Lines Matching refs:Position
384 // Find the byte position of the truncation point.
385 const char *Position = Buffer->getBufferStart();
387 for (; *Position; ++Position) {
388 if (*Position != '\r' && *Position != '\n')
392 if ((Position[1] == '\r' || Position[1] == '\n') &&
393 Position[0] != Position[1])
394 ++Position;
395 ++Position;
400 Position += CompleteColumn - 1;
402 // If pointing inside the preamble, adjust the position at the beginning of
406 if (Position - Buffer->getBufferStart() < SkipMainFilePreamble.first)
407 Position = Buffer->getBufferStart() + SkipMainFilePreamble.first;
410 if (Position > Buffer->getBufferEnd())
411 Position = Buffer->getBufferEnd();
414 CodeCompletionOffset = Position - Buffer->getBufferStart();
420 char *NewPos = std::copy(Buffer->getBufferStart(), Position, NewBuf);
422 std::copy(Position, Buffer->getBufferEnd(), NewPos+1);