on main help sign in
fix(diffview): do not print ellipsis after content has being fully printed
commitc5bf83060e40b7cdc1d6cac2b2afe82506d7f3d3 authorAndrey Nering <andreynering@users.noreply.github.com> dateWed 11 Jun 2025, 15:19 (1 year ago) parent9f5d70c
17 files changed+52−52
internal/exp/diffview/diffview.go+2−2 internal/exp/diffview/testdata/TestDiffViewHeight/Split/DarkMode/HeightOf016.golden+1−1 internal/exp/diffview/testdata/TestDiffViewHeight/Split/DarkMode/HeightOf017.golden+2−2 internal/exp/diffview/testdata/TestDiffViewHeight/Split/DarkMode/HeightOf018.golden+3−3 internal/exp/diffview/testdata/TestDiffViewHeight/Split/DarkMode/HeightOf019.golden+4−4 internal/exp/diffview/testdata/TestDiffViewHeight/Split/DarkMode/HeightOf020.golden+5−5 internal/exp/diffview/testdata/TestDiffViewHeight/Split/LightMode/HeightOf016.golden+1−1 internal/exp/diffview/testdata/TestDiffViewHeight/Split/LightMode/HeightOf017.golden+2−2 internal/exp/diffview/testdata/TestDiffViewHeight/Split/LightMode/HeightOf018.golden+3−3 internal/exp/diffview/testdata/TestDiffViewHeight/Split/LightMode/HeightOf019.golden+4−4 internal/exp/diffview/testdata/TestDiffViewHeight/Split/LightMode/HeightOf020.golden+5−5 internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf11.golden+1−1 internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf12.golden+2−2 internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf13.golden+3−3 internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf14.golden+4−4 internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf15.golden+5−5 internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf16.golden+5−5
internal/exp/diffview/diffview.go+2−2
@@ -539,11 +539,11 @@ outer:
539539
540540 for printedLines < dv.height {
541541 if dv.lineNumbers {
542− write(dv.style.MissingLine.LineNumber.Render(pad("…", dv.beforeNumDigits)))
542+ write(dv.style.MissingLine.LineNumber.Render(pad(" ", dv.beforeNumDigits)))
543543 }
544544 write(dv.style.MissingLine.Code.Width(dv.fullCodeWidth).Render(" "))
545545 if dv.lineNumbers {
546− write(dv.style.MissingLine.LineNumber.Render(pad("…", dv.afterNumDigits)))
546+ write(dv.style.MissingLine.LineNumber.Render(pad(" ", dv.afterNumDigits)))
547547 }
548548 write(dv.style.MissingLine.Code.Width(dv.fullCodeWidth + btoi(dv.extraColOnAfter)).Render(" "))
549549 write("\n")
internal/exp/diffview/testdata/TestDiffViewHeight/Split/DarkMode/HeightOf016.golden+1−1
@@ -13,4 +13,4 @@
1313 12 -  return "Hello, world!"  13 +  content := strings.ToUpper("Hello, World!") 
1414      14 +  return content 
1515 13  }  15  } 
16−  …     …   
16+          
internal/exp/diffview/testdata/TestDiffViewHeight/Split/DarkMode/HeightOf017.golden+2−2
@@ -13,5 +13,5 @@
1313 12 -  return "Hello, world!"  13 +  content := strings.ToUpper("Hello, World!") 
1414      14 +  return content 
1515 13  }  15  } 
16−  …     …   
17−  …     …   
16+          
17+          
internal/exp/diffview/testdata/TestDiffViewHeight/Split/DarkMode/HeightOf018.golden+3−3
@@ -13,6 +13,6 @@
1313 12 -  return "Hello, world!"  13 +  content := strings.ToUpper("Hello, World!") 
1414      14 +  return content 
1515 13  }  15  } 
16−  …     …   
17−  …     …   
18−  …     …   
16+          
17+          
18+          
internal/exp/diffview/testdata/TestDiffViewHeight/Split/DarkMode/HeightOf019.golden+4−4
@@ -13,7 +13,7 @@
1313 12 -  return "Hello, world!"  13 +  content := strings.ToUpper("Hello, World!") 
1414      14 +  return content 
1515 13  }  15  } 
16−  …     …   
17−  …     …   
18−  …     …   
19−  …     …   
16+          
17+          
18+          
19+          
internal/exp/diffview/testdata/TestDiffViewHeight/Split/DarkMode/HeightOf020.golden+5−5
@@ -13,8 +13,8 @@
1313 12 -  return "Hello, world!"  13 +  content := strings.ToUpper("Hello, World!") 
1414      14 +  return content 
1515 13  }  15  } 
16−  …     …   
17−  …     …   
18−  …     …   
19−  …     …   
20−  …     …   
16+          
17+          
18+          
19+          
20+          
internal/exp/diffview/testdata/TestDiffViewHeight/Split/LightMode/HeightOf016.golden+1−1
@@ -13,4 +13,4 @@
1313 12 -  return "Hello, world!"  13 +  content := strings.ToUpper("Hello, World!") 
1414      14 +  return content 
1515 13  }  15  } 
16−  …     …   
16+          
internal/exp/diffview/testdata/TestDiffViewHeight/Split/LightMode/HeightOf017.golden+2−2
@@ -13,5 +13,5 @@
1313 12 -  return "Hello, world!"  13 +  content := strings.ToUpper("Hello, World!") 
1414      14 +  return content 
1515 13  }  15  } 
16−  …     …   
17−  …     …   
16+          
17+          
internal/exp/diffview/testdata/TestDiffViewHeight/Split/LightMode/HeightOf018.golden+3−3
@@ -13,6 +13,6 @@
1313 12 -  return "Hello, world!"  13 +  content := strings.ToUpper("Hello, World!") 
1414      14 +  return content 
1515 13  }  15  } 
16−  …     …   
17−  …     …   
18−  …     …   
16+          
17+          
18+          
internal/exp/diffview/testdata/TestDiffViewHeight/Split/LightMode/HeightOf019.golden+4−4
@@ -13,7 +13,7 @@
1313 12 -  return "Hello, world!"  13 +  content := strings.ToUpper("Hello, World!") 
1414      14 +  return content 
1515 13  }  15  } 
16−  …     …   
17−  …     …   
18−  …     …   
19−  …     …   
16+          
17+          
18+          
19+          
internal/exp/diffview/testdata/TestDiffViewHeight/Split/LightMode/HeightOf020.golden+5−5
@@ -13,8 +13,8 @@
1313 12 -  return "Hello, world!"  13 +  content := strings.ToUpper("Hello, World!") 
1414      14 +  return content 
1515 13  }  15  } 
16−  …     …   
17−  …     …   
18−  …     …   
19−  …     …   
20−  …     …   
16+          
17+          
18+          
19+          
20+          
internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf11.golden+1−1
@@ -2,4 +2,4 @@
22 12 -  return "Hello, world!"  13 +  content := strings.ToUpper("Hello, World!") 
33      14 +  return content 
44 13  }  15  } 
5−  …     …   
5+          
internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf12.golden+2−2
@@ -1,5 +1,5 @@
11 12 -  return "Hello, world!"  13 +  content := strings.ToUpper("Hello, World!") 
22      14 +  return content 
33 13  }  15  } 
4−  …     …   
5−  …     …   
4+          
5+          
internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf13.golden+3−3
@@ -1,5 +1,5 @@
11      14 +  return content 
22 13  }  15  } 
3−  …     …   
4−  …     …   
5−  …     …   
3+          
4+          
5+          
internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf14.golden+4−4
@@ -1,5 +1,5 @@
11 13  }  15  } 
2−  …     …   
3−  …     …   
4−  …     …   
5−  …     …   
2+          
3+          
4+          
5+          
internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf15.golden+5−5
@@ -1,5 +1,5 @@
1−  …     …   
2−  …     …   
3−  …     …   
4−  …     …   
5−  …     …   
1+          
2+          
3+          
4+          
5+          
internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf16.golden+5−5
@@ -1,5 +1,5 @@
1−  …     …   
2−  …     …   
3−  …     …   
4−  …     …   
5−  …     …   
1+          
2+          
3+          
4+          
5+