Skip to content

Commit

Permalink
Merge pull request #592 from r-lib/fix-partial-match
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborcsardi committed Mar 23, 2023
2 parents c923764 + 1b60151 commit 8d8a211
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/diff.R
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ get_diff_chunks <- function(lcs, context = 3L) {

# chunk starts at operation number sum(length) before it, plus 1, but
# at the end we change this to include the context chunks are well
chunks$op_begin <- c(0, cumsum(runs$length))[which(runs$values)] + 1
chunks$op_begin <- c(0, cumsum(runs$lengths))[which(runs$values)] + 1
chunks$op_length <- runs$lengths[runs$values]

# `old` positions are from `old_off`, but need to fix the boundaries
Expand Down

0 comments on commit 8d8a211

Please sign in to comment.