diff options
Diffstat (limited to 'src/util/edit_map.rs')
-rw-r--r-- | src/util/edit_map.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/util/edit_map.rs b/src/util/edit_map.rs index b1b5064..6085f18 100644 --- a/src/util/edit_map.rs +++ b/src/util/edit_map.rs @@ -35,9 +35,11 @@ fn shift_links(events: &mut [Event], jumps: &[(usize, usize, usize)]) { let mut index = 0; while index < events.len() { - let event = &mut events[index]; - event.previous = event.previous.map(map); - event.next = event.next.map(map); + if let Some(link) = &mut events[index].link { + link.previous = link.previous.map(map); + link.next = link.next.map(map); + } + index += 1; } } |