Show More
@@ -184,7 +184,7 b' static int longest_match(struct bdiff_li' | |||
|
184 | 184 | mj = j; |
|
185 | 185 | mk = k; |
|
186 | 186 | } else if (k == mk) { |
|
187 | if (i > mi && i <= half) { | |
|
187 | if (i > mi && i <= half && j > b1) { | |
|
188 | 188 | /* same match but closer to half */ |
|
189 | 189 | mi = i; |
|
190 | 190 | mj = j; |
@@ -88,7 +88,7 b' print("Diff 1 to 3 lines - preference fo' | |||
|
88 | 88 | showdiff('a\n', 'a\n' * 3) |
|
89 | 89 | print("Diff 1 to 5 lines - preference for appending:") |
|
90 | 90 | showdiff('a\n', 'a\n' * 5) |
|
91 |
print("Diff 3 to 1 lines - preference for |
|
|
91 | print("Diff 3 to 1 lines - preference for removing trailing lines:") | |
|
92 | 92 | showdiff('a\n' * 3, 'a\n') |
|
93 |
print("Diff 5 to 1 lines - preference for |
|
|
93 | print("Diff 5 to 1 lines - preference for removing trailing lines:") | |
|
94 | 94 | showdiff('a\n' * 5, 'a\n') |
@@ -68,17 +68,15 b' showdiff(' | |||
|
68 | 68 | 'a\na\na\na\na\n'): |
|
69 | 69 | 'a\n' |
|
70 | 70 | 2 2 '' -> 'a\na\na\na\n' |
|
71 |
Diff 3 to 1 lines - preference for |
|
|
71 | Diff 3 to 1 lines - preference for removing trailing lines: | |
|
72 | 72 | showdiff( |
|
73 | 73 | 'a\na\na\n', |
|
74 | 74 | 'a\n'): |
|
75 | 0 2 'a\n' -> '' | |
|
76 | 75 | 'a\n' |
|
77 |
|
|
|
78 |
Diff 5 to 1 lines - preference for |
|
|
76 | 2 6 'a\na\n' -> '' | |
|
77 | Diff 5 to 1 lines - preference for removing trailing lines: | |
|
79 | 78 | showdiff( |
|
80 | 79 | 'a\na\na\na\na\n', |
|
81 | 80 | 'a\n'): |
|
82 | 0 4 'a\na\n' -> '' | |
|
83 | 81 | 'a\n' |
|
84 |
|
|
|
82 | 2 10 'a\na\na\na\n' -> '' |
General Comments 0
You need to be logged in to leave comments.
Login now