/** * @param CursorState $state */ public function restoreState(CursorState $state) { $this->line = $state->getLine(); $this->length = $state->getLength(); $this->currentPosition = $state->getCurrentPosition(); $this->previousPosition = $state->getPreviousPosition(); $this->firstNonSpaceCache = $state->getFirstNonSpaceCache(); }