Commit ecc3c9f0 authored by hluk's avatar hluk Committed by hjk

FakeVim: Perform undo/redo at least once

Change-Id: I289cb48cab47f4b0462f00ac490c66607a40dba2
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent ce0efbda
......@@ -7157,8 +7157,8 @@ void FakeVimHandler::Private::undoRedo(bool undo)
++m_editBlockLevel;
// Do undo/redo [count] times to reach previous revision.
int count = m_undoState.isValid() ? m_undoState.revisions
: state.isValid() ? state.revisions : 1;
int count = qMax(1, m_undoState.isValid() ? m_undoState.revisions
: state.revisions);
while (count-- > 0) {
if (undo)
EDITOR(undo());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment