QTextEdit

Before cursor repositioning:


After cursor repositioning