<table><tr><td style="">poboiko created this revision.<br />poboiko added reviewers: Frameworks, mlaurent.<br />Herald added a project: Frameworks.<br />poboiko requested review of this revision.
</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/D28819">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>If my cursor is on a bullet list, and I press Enter to create a new element,<br />
it registers as 5-7 actions in an undo stack, mostly margins adjustments. So to<br />
rewind it, user has to press <tt style="background: #ebebeb; font-size: 13px;">Ctrl+Z</tt> 5+ times, which is quite frustrating.</p>
<p>Instead this patch suggests to treat _any_ change that is a result of a single<br />
key press as a single event, so user has to press <tt style="background: #ebebeb; font-size: 13px;">Ctrl+Z</tt> just once to undo it</p></div></div><br /><div><strong>TEST PLAN</strong><div><ol class="remarkup-list">
<li class="remarkup-list-item">Open KMail -> New Mail, enable Rich Text mode (or, say, open KJots)</li>
<li class="remarkup-list-item">Create a bullet list with couple of elements</li>
<li class="remarkup-list-item">Put cursor on the last element, press Enter to create a new element</li>
<li class="remarkup-list-item">Try to undo this action with Ctrl+Z</li>
<li class="remarkup-list-item">(without patch) One has to press Ctrl+Z 5-7 times to undo it.</li>
<li class="remarkup-list-item">(with patch) A single Ctrl+Z is enough</li>
</ol></div></div><br /><div><strong>REPOSITORY</strong><div><div>R310 KTextWidgets</div></div></div><br /><div><strong>BRANCH</strong><div><div>single-undo (branched from master)</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D28819">https://phabricator.kde.org/D28819</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/widgets/krichtextedit.cpp</div></div></div><br /><div><strong>To: </strong>poboiko, Frameworks, mlaurent<br /><strong>Cc: </strong>kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns<br /></div>