Fix two bidi issues
- A blinking cursor is updated in its logical position. Previously, logical and visual positions of the cursor were identical, but since 22.12.0 they may differ, so save the cursor visual position and update that instead.
- When A line has RTL direction (and thus, right aligned), don't skip the spaces at the end of line, since they do matter.