Cursor offsetting and text offsetting