diff --git a/cli/src/movement_util.rs b/cli/src/movement_util.rs index d14466c5c8..1c0cdddd2c 100644 --- a/cli/src/movement_util.rs +++ b/cli/src/movement_util.rs @@ -109,16 +109,21 @@ impl Direction { args: &MovementArgsInternal, ) -> Result, CommandError> { let target_revset = match self { - Direction::Next => if args.conflict { - start_revset - .children() - .descendants() - .filtered(RevsetFilterPredicate::HasConflict) - .roots() - } else { - start_revset.descendants_at(args.offset) + Direction::Next => { + if args.conflict { + start_revset + .children() + .minus(working_revset) + .descendants() + .filtered(RevsetFilterPredicate::HasConflict) + .roots() + } else { + start_revset + .children() + .minus(working_revset) + .descendants_at(args.offset) + } } - .minus(working_revset), Direction::Prev => { if args.conflict {