run modernize

This commit is contained in:
Kovid Goyal
2025-11-11 17:09:37 +05:30
parent 1faf786bd2
commit 6f588a0c29
30 changed files with 46 additions and 60 deletions

View File

@@ -119,10 +119,7 @@ func Diff(oldName, old, newName, new string, num_of_context_lines int) []byte {
// End chunk with common lines for context.
if len(ctext) > 0 {
n := end.x - start.x
if n > C {
n = C
}
n := min(end.x-start.x, C)
for _, s := range x[start.x : start.x+n] {
ctext = append(ctext, " "+s)
count.x++
@@ -237,7 +234,7 @@ func tgs(x, y []string) []pair {
for i := range T {
T[i] = n + 1
}
for i := 0; i < n; i++ {
for i := range n {
k := sort.Search(n, func(k int) bool {
return T[k] >= J[i]
})