The position-cursor function now uses cursor-line/cursor-col stored by
view-input instead of recomputing from scratch, guaranteeing alignment
with the rendered text. The boundary check uses (< pos (+ accum len))
to avoid falsely matching the first character of the next wrapped line.
Removed the speculative reset-recovery code that sent cursor to end
when pos was 0, since that broke legitimate navigation to the
beginning of the input.