ajusting caret positioning after paragraph re-parsing