<table><tr><td style="">dfaure requested changes to this revision.<br />dfaure added a comment.<br />This revision now requires changes to proceed.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D29107">View Revision</a></tr></table><br /><div><div><p>You say "The format does not seem to exist before the first character" and yet that's exactly where you're moving the cursor.<br />
The code looks ok to me, but the comment is confusing/wrong.</p>

<p>It's just about setting the format of the cursor from the first char. I agree that it's probably a bug that setDocument doesn't trigger that, but I'm not sure the old bug report reference still makes sense here, it feels like a different issue to me (the comment and old workaround says "there's nothing at pos 0, go to pos 1 to grab the format"). Unrelated to your issue and fix.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R573 KJots</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D29107">https://phabricator.kde.org/D29107</a></div></div><br /><div><strong>To: </strong>poboiko, dvratil, dfaure<br /><strong>Cc: </strong>kde-pim, fbampaloukas, dcaliste, dvasin, rodsevich, winterz, vkrause, mlaurent, knauss, dvratil<br /></div>