D28287: Undo cursor move
Mickael Bosch <[email protected]>
| Newsgroups | gmane.comp.kde.devel.kwrite |
|---|---|
| Message-ID | <[email protected]> |
mickaelbo created this revision. mickaelbo added a reviewer: Kate. Herald added a project: Kate. Herald added a subscriber: kwrite-devel. mickaelbo requested review of this revision. REVISION SUMMARY Undo/redo cursor moves in a view. This implements Bug 409940 from the KDE bug tracker. A cursor move must be at least 10 lines long to be recorded. Should we allow to customize this hardcoded value ? For now, the shortcut to undo a move is shift + mouse Qt::BackButton, redo is shift + mouse Qt::ForwardButton. Should we add an action in another commit to trigger undo/redo from a user defined shortcut? TEST PLAN Open a document with more than 10 lines. The default cursor position is 0. Click inside line 11. Trigger the undo action, the cursor goes back to line 0. Trigger the redo action, the cursor goes back to line 11. Click inside line 5 and click undo (the history is not affected). Trigger the undo action, the cursor goes back to line 0. REPOSITORY R40 Kate REVISION DETAIL https://phabricator.kde.org/D28287 AFFECTED FILES kate/katemainwindow.cpp kate/katemainwindow.h kate/kateviewmanager.cpp kate/kateviewmanager.h To: mickaelbo, #kate Cc: kwrite-devel, rrosch, domson, michaelh, ngraham, demsking, cullmann, sars, dhaumann