Lines Matching refs:pos

378 	TermPos pos(start);
380 if (IsFullWidthChar(pos.y, pos.x))
381 pos.x--;
384 while (pos.y < end.y) {
385 TerminalLine* line = _GetPartialLineString(string, pos.y, pos.x,
389 pos.x = 0;
390 pos.y++;
395 _GetPartialLineString(string, end.y, pos.x, end.x);
400 BasicTerminalBuffer::FindWord(const TermPos& pos,
404 int32 x = pos.x;
405 int32 y = pos.y;
470 BasicTerminalBuffer::PreviousLinePos(TermPos& pos) const
473 TerminalLine* line = _HistoryLineAt(pos.y, lineBuffer);
474 if (line == NULL || pos.x < 0 || pos.x >= fWidth)
477 return _PreviousLinePos(lineBuffer, line, pos);
482 BasicTerminalBuffer::NextLinePos(TermPos& pos, bool normalize) const
485 TerminalLine* line = _HistoryLineAt(pos.y, lineBuffer);
486 if (line == NULL || pos.x < 0 || pos.x > fWidth)
489 if (!_NormalizeLinePos(lineBuffer, line, pos))
492 pos.x += line->cells[pos.x].attributes.IsWidth() ? FULL_WIDTH : HALF_WIDTH;
493 return !normalize || _NormalizeLinePos(lineBuffer, line, pos);
525 // normalize pos, so that _NextChar() and _PreviousChar() are happy
526 TermPos pos(start);
528 TerminalLine* line = _HistoryLineAt(pos.y, lineBuffer);
531 while (line != NULL && pos.x >= line->length && line->softBreak) {
532 pos.x = 0;
533 pos.y++;
534 line = _HistoryLineAt(pos.y, lineBuffer);
537 if (pos.x > line->length)
538 pos.x = line->length;
578 //debug_printf(" (%ld, %ld): matchIndex: %ld\n", pos.x, pos.y, matchIndex);
579 TermPos previousPos(pos);
581 if (!(forward ? _NextChar(pos, c) : _PreviousChar(pos, c)))
594 TermPos matchEnd(pos);
616 pos = matchStart;
618 _NextChar(pos, c);
620 _PreviousChar(pos, c);
1674 /*! Decrement \a pos and return the char at that location.
1677 BasicTerminalBuffer::_PreviousChar(TermPos& pos, UTF8Char& c) const
1679 pos.x--;
1682 TerminalLine* line = _HistoryLineAt(pos.y, lineBuffer);
1685 if (pos.x < 0) {
1686 pos.y--;
1687 line = _HistoryLineAt(pos.y, lineBuffer);
1691 pos.x = line->length;
1693 pos.x--;
1699 c = line->cells[pos.x].character;
1706 /*! Return the char at \a pos and increment it.
1709 BasicTerminalBuffer::_NextChar(TermPos& pos, UTF8Char& c) const
1712 TerminalLine* line = _HistoryLineAt(pos.y, lineBuffer);
1716 if (pos.x >= line->length) {
1718 pos.x = 0;
1719 pos.y++;
1723 c = line->cells[pos.x].character;
1725 pos.x++;
1726 while (line != NULL && pos.x >= line->length && line->softBreak) {
1727 pos.x = 0;
1728 pos.y++;
1729 line = _HistoryLineAt(pos.y, lineBuffer);
1738 TerminalLine*& line, TermPos& pos) const
1740 if (--pos.x < 0) {
1743 pos.y--;
1744 if ((line = _HistoryLineAt(pos.y, lineBuffer)) == NULL
1748 pos.x = line->length - 1;
1750 if (pos.x > 0 && line->cells[pos.x - 1].attributes.IsWidth())
1751 pos.x--;
1759 TerminalLine*& line, TermPos& pos) const
1761 if (pos.x < line->length)
1769 pos.y++;
1770 pos.x = 0;
1771 line = _HistoryLineAt(pos.y, lineBuffer);