Skip to content

Commit

Permalink
Fix position of last (marked) element in PredicateContext.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Simkin committed May 28, 2018
1 parent a0f380e commit c1d69b8
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,10 @@ private final class PredicateContext<T extends Node> implements Function<NodeVie

@Override
public NodeView<T> apply(NodeView<T> view) {
this.last = null == last || !last.isNew() ? view : last;
this.position++;
if (null == last || !last.isNew()) {
last = view;
position++;
}
return view;
}

Expand Down

0 comments on commit c1d69b8

Please sign in to comment.