mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-04 14:46:03 +00:00
Modernize Go code
This commit is contained in:
parent
3d13cf1ca5
commit
eddaaed3e3
16 changed files with 64 additions and 87 deletions
|
|
@ -215,7 +215,7 @@ func word_diff_center(left, right string, re *regexp.Regexp) Center {
|
|||
// on exactly one side, the lines differ in word count and it makes more
|
||||
// sense to highlight the single changed central region of the whole line.
|
||||
max_idx := max(len(left_words), len(right_words))
|
||||
for idx := 0; idx < max_idx; idx++ {
|
||||
for idx := range max_idx {
|
||||
lc := idx < len(left_words) && left_changed_abs[idx]
|
||||
rc := idx < len(right_words) && right_changed_abs[idx]
|
||||
if lc != rc {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue