* Move to previous character position. * @param what Move ITER_CHARACTER or ITER_WORD. * @return true iff able to move. */
| 326 | * @return true iff able to move. |
| 327 | */ |
| 328 | bool Textbuf::MovePrev(StringIterator::IterType what) |
| 329 | { |
| 330 | if (this->caretpos == 0) return false; |
| 331 | |
| 332 | size_t pos = this->char_iter->Prev(what); |
| 333 | if (pos == StringIterator::END) return true; |
| 334 | |
| 335 | this->caretpos = static_cast<uint16_t>(pos); |
| 336 | this->UpdateCaretPosition(); |
| 337 | return true; |
| 338 | } |
| 339 | |
| 340 | /** |
| 341 | * Move to next character position. |
no test coverage detected