D28819: [KRichTextEdit] Always treat key press as single modification in undo stack
Igor Poboiko
noreply at phabricator.kde.org
Tue Apr 14 12:10:23 BST 2020
poboiko created this revision.
poboiko added reviewers: Frameworks, mlaurent.
Herald added a project: Frameworks.
poboiko requested review of this revision.
REVISION SUMMARY
If my cursor is on a bullet list, and I press Enter to create a new element,
it registers as 5-7 actions in an undo stack, mostly margins adjustments. So to
rewind it, user has to press `Ctrl+Z` 5+ times, which is quite frustrating.
Instead this patch suggests to treat _any_ change that is a result of a single
key press as a single event, so user has to press `Ctrl+Z` just once to undo it
TEST PLAN
1. Open KMail -> New Mail, enable Rich Text mode (or, say, open KJots)
2. Create a bullet list with couple of elements
3. Put cursor on the last element, press Enter to create a new element
4. Try to undo this action with Ctrl+Z
5. (without patch) One has to press Ctrl+Z 5-7 times to undo it.
6. (with patch) A single Ctrl+Z is enough
REPOSITORY
R310 KTextWidgets
BRANCH
single-undo (branched from master)
REVISION DETAIL
https://phabricator.kde.org/D28819
AFFECTED FILES
src/widgets/krichtextedit.cpp
To: poboiko, #frameworks, mlaurent
Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200414/3b31e644/attachment.html>
More information about the Kde-frameworks-devel
mailing list