From 40d44fc41fcfaba59782f8256a657c3d3db152d0 Mon Sep 17 00:00:00 2001 From: Franck Dary <franck.dary@lis-lab.fr> Date: Thu, 13 Feb 2020 13:13:34 +0100 Subject: [PATCH] Fixed undo of moving actions --- reading_machine/src/Action.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reading_machine/src/Action.cpp b/reading_machine/src/Action.cpp index 7391396..7dcaf78 100644 --- a/reading_machine/src/Action.cpp +++ b/reading_machine/src/Action.cpp @@ -36,7 +36,7 @@ Action Action::moveWordIndex(int movement) auto undo = [movement](Config & config, Action &) { - config.moveWordIndex(movement); + config.moveWordIndex(-movement); }; auto appliable = [movement](const Config & config, const Action &) @@ -56,7 +56,7 @@ Action Action::moveCharacterIndex(int movement) auto undo = [movement](Config & config, Action &) { - config.moveCharacterIndex(movement); + config.moveCharacterIndex(-movement); }; auto appliable = [movement](const Config & config, const Action &) -- GitLab