From 43adbc89e377c5f57fa7e2944c96dc605a2de96f Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Tue, 22 Dec 2015 17:29:36 +0100 Subject: Fix off-by-one when extracting edits --- monkey/edits.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'monkey') diff --git a/monkey/edits.py b/monkey/edits.py index 447b71b..7ebb034 100644 --- a/monkey/edits.py +++ b/monkey/edits.py @@ -101,7 +101,7 @@ def get_edits_from_trace(trace, test, id): elif action.offset == pos_end: if (prev_action is None or prev_action.type == 'insert' and prev_action.offset == action.offset-1 or - prev_action.type == 'remove' and prev_action.offset == action.offset-1): + prev_action.type == 'remove' and prev_action.offset == action.offset): orig_next = None for terminal in start_tree.leaves(): if terminal.pos >= start_tokens[-1].pos + len(start_tokens[-1].val): -- cgit v1.2.1