fix(diffview): do not print ellipsis after content has being fully printed

Andrey Nering created

Change summary

internal/exp/diffview/diffview.go                                                    |  4 
internal/exp/diffview/testdata/TestDiffViewHeight/Split/DarkMode/HeightOf016.golden  |  2 
internal/exp/diffview/testdata/TestDiffViewHeight/Split/DarkMode/HeightOf017.golden  |  4 
internal/exp/diffview/testdata/TestDiffViewHeight/Split/DarkMode/HeightOf018.golden  |  6 
internal/exp/diffview/testdata/TestDiffViewHeight/Split/DarkMode/HeightOf019.golden  |  8 
internal/exp/diffview/testdata/TestDiffViewHeight/Split/DarkMode/HeightOf020.golden  | 10 
internal/exp/diffview/testdata/TestDiffViewHeight/Split/LightMode/HeightOf016.golden |  2 
internal/exp/diffview/testdata/TestDiffViewHeight/Split/LightMode/HeightOf017.golden |  4 
internal/exp/diffview/testdata/TestDiffViewHeight/Split/LightMode/HeightOf018.golden |  6 
internal/exp/diffview/testdata/TestDiffViewHeight/Split/LightMode/HeightOf019.golden |  8 
internal/exp/diffview/testdata/TestDiffViewHeight/Split/LightMode/HeightOf020.golden | 10 
internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf11.golden          |  2 
internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf12.golden          |  4 
internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf13.golden          |  6 
internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf14.golden          |  8 
internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf15.golden          | 10 
internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf16.golden          | 10 
17 files changed, 52 insertions(+), 52 deletions(-)

Detailed changes

internal/exp/diffview/diffview.go šŸ”—

@@ -539,11 +539,11 @@ outer:
 
 	for printedLines < dv.height {
 		if dv.lineNumbers {
-			write(dv.style.MissingLine.LineNumber.Render(pad("…", dv.beforeNumDigits)))
+			write(dv.style.MissingLine.LineNumber.Render(pad(" ", dv.beforeNumDigits)))
 		}
 		write(dv.style.MissingLine.Code.Width(dv.fullCodeWidth).Render(" "))
 		if dv.lineNumbers {
-			write(dv.style.MissingLine.LineNumber.Render(pad("…", dv.afterNumDigits)))
+			write(dv.style.MissingLine.LineNumber.Render(pad(" ", dv.afterNumDigits)))
 		}
 		write(dv.style.MissingLine.Code.Width(dv.fullCodeWidth + btoi(dv.extraColOnAfter)).Render(" "))
 		write("\n")

internal/exp/diffview/testdata/TestDiffViewHeight/Split/DarkMode/HeightOf016.golden šŸ”—

@@ -13,4 +13,4 @@
 Ā 12Ā -     return "Hello, world!"                      Ā 13Ā +     content := strings.ToUpper("Hello, World!") 
 Ā   Ā                                                   Ā 14Ā +     return content                              
 Ā 13Ā   }                                               Ā 15Ā   }                                               
-Ā  …Ā                                                   Ā  …Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   

internal/exp/diffview/testdata/TestDiffViewHeight/Split/DarkMode/HeightOf017.golden šŸ”—

@@ -13,5 +13,5 @@
 Ā 12Ā -     return "Hello, world!"                      Ā 13Ā +     content := strings.ToUpper("Hello, World!") 
 Ā   Ā                                                   Ā 14Ā +     return content                              
 Ā 13Ā   }                                               Ā 15Ā   }                                               
-Ā  …Ā                                                   Ā  …Ā                                                   
-Ā  …Ā                                                   Ā  …Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   

internal/exp/diffview/testdata/TestDiffViewHeight/Split/DarkMode/HeightOf018.golden šŸ”—

@@ -13,6 +13,6 @@
 Ā 12Ā -     return "Hello, world!"                      Ā 13Ā +     content := strings.ToUpper("Hello, World!") 
 Ā   Ā                                                   Ā 14Ā +     return content                              
 Ā 13Ā   }                                               Ā 15Ā   }                                               
-Ā  …Ā                                                   Ā  …Ā                                                   
-Ā  …Ā                                                   Ā  …Ā                                                   
-Ā  …Ā                                                   Ā  …Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   

internal/exp/diffview/testdata/TestDiffViewHeight/Split/DarkMode/HeightOf019.golden šŸ”—

@@ -13,7 +13,7 @@
 Ā 12Ā -     return "Hello, world!"                      Ā 13Ā +     content := strings.ToUpper("Hello, World!") 
 Ā   Ā                                                   Ā 14Ā +     return content                              
 Ā 13Ā   }                                               Ā 15Ā   }                                               
-Ā  …Ā                                                   Ā  …Ā                                                   
-Ā  …Ā                                                   Ā  …Ā                                                   
-Ā  …Ā                                                   Ā  …Ā                                                   
-Ā  …Ā                                                   Ā  …Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   

internal/exp/diffview/testdata/TestDiffViewHeight/Split/DarkMode/HeightOf020.golden šŸ”—

@@ -13,8 +13,8 @@
 Ā 12Ā -     return "Hello, world!"                      Ā 13Ā +     content := strings.ToUpper("Hello, World!") 
 Ā   Ā                                                   Ā 14Ā +     return content                              
 Ā 13Ā   }                                               Ā 15Ā   }                                               
-Ā  …Ā                                                   Ā  …Ā                                                   
-Ā  …Ā                                                   Ā  …Ā                                                   
-Ā  …Ā                                                   Ā  …Ā                                                   
-Ā  …Ā                                                   Ā  …Ā                                                   
-Ā  …Ā                                                   Ā  …Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   

internal/exp/diffview/testdata/TestDiffViewHeight/Split/LightMode/HeightOf016.golden šŸ”—

@@ -13,4 +13,4 @@
 Ā 12Ā -     return "Hello, world!"                      Ā 13Ā +     content := strings.ToUpper("Hello, World!") 
 Ā   Ā                                                   Ā 14Ā +     return content                              
 Ā 13Ā   }                                               Ā 15Ā   }                                               
-Ā  …Ā                                                   Ā  …Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   

internal/exp/diffview/testdata/TestDiffViewHeight/Split/LightMode/HeightOf017.golden šŸ”—

@@ -13,5 +13,5 @@
 Ā 12Ā -     return "Hello, world!"                      Ā 13Ā +     content := strings.ToUpper("Hello, World!") 
 Ā   Ā                                                   Ā 14Ā +     return content                              
 Ā 13Ā   }                                               Ā 15Ā   }                                               
-Ā  …Ā                                                   Ā  …Ā                                                   
-Ā  …Ā                                                   Ā  …Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   

internal/exp/diffview/testdata/TestDiffViewHeight/Split/LightMode/HeightOf018.golden šŸ”—

@@ -13,6 +13,6 @@
 Ā 12Ā -     return "Hello, world!"                      Ā 13Ā +     content := strings.ToUpper("Hello, World!") 
 Ā   Ā                                                   Ā 14Ā +     return content                              
 Ā 13Ā   }                                               Ā 15Ā   }                                               
-Ā  …Ā                                                   Ā  …Ā                                                   
-Ā  …Ā                                                   Ā  …Ā                                                   
-Ā  …Ā                                                   Ā  …Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   

internal/exp/diffview/testdata/TestDiffViewHeight/Split/LightMode/HeightOf019.golden šŸ”—

@@ -13,7 +13,7 @@
 Ā 12Ā -     return "Hello, world!"                      Ā 13Ā +     content := strings.ToUpper("Hello, World!") 
 Ā   Ā                                                   Ā 14Ā +     return content                              
 Ā 13Ā   }                                               Ā 15Ā   }                                               
-Ā  …Ā                                                   Ā  …Ā                                                   
-Ā  …Ā                                                   Ā  …Ā                                                   
-Ā  …Ā                                                   Ā  …Ā                                                   
-Ā  …Ā                                                   Ā  …Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   

internal/exp/diffview/testdata/TestDiffViewHeight/Split/LightMode/HeightOf020.golden šŸ”—

@@ -13,8 +13,8 @@
 Ā 12Ā -     return "Hello, world!"                      Ā 13Ā +     content := strings.ToUpper("Hello, World!") 
 Ā   Ā                                                   Ā 14Ā +     return content                              
 Ā 13Ā   }                                               Ā 15Ā   }                                               
-Ā  …Ā                                                   Ā  …Ā                                                   
-Ā  …Ā                                                   Ā  …Ā                                                   
-Ā  …Ā                                                   Ā  …Ā                                                   
-Ā  …Ā                                                   Ā  …Ā                                                   
-Ā  …Ā                                                   Ā  …Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   

internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf11.golden šŸ”—

@@ -2,4 +2,4 @@
 Ā 12Ā -     return "Hello, world!"                      Ā 13Ā +     content := strings.ToUpper("Hello, World!") 
 Ā   Ā                                                   Ā 14Ā +     return content                              
 Ā 13Ā   }                                               Ā 15Ā   }                                               
-Ā  …Ā                                                   Ā  …Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   

internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf12.golden šŸ”—

@@ -1,5 +1,5 @@
 Ā 12Ā -     return "Hello, world!"                      Ā 13Ā +     content := strings.ToUpper("Hello, World!") 
 Ā   Ā                                                   Ā 14Ā +     return content                              
 Ā 13Ā   }                                               Ā 15Ā   }                                               
-Ā  …Ā                                                   Ā  …Ā                                                   
-Ā  …Ā                                                   Ā  …Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   

internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf13.golden šŸ”—

@@ -1,5 +1,5 @@
 Ā   Ā                                                   Ā 14Ā +     return content                              
 Ā 13Ā   }                                               Ā 15Ā   }                                               
-Ā  …Ā                                                   Ā  …Ā                                                   
-Ā  …Ā                                                   Ā  …Ā                                                   
-Ā  …Ā                                                   Ā  …Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   

internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf14.golden šŸ”—

@@ -1,5 +1,5 @@
 Ā 13Ā   }                                               Ā 15Ā   }                                               
-Ā  …Ā                                                   Ā  …Ā                                                   
-Ā  …Ā                                                   Ā  …Ā                                                   
-Ā  …Ā                                                   Ā  …Ā                                                   
-Ā  …Ā                                                   Ā  …Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   

internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf15.golden šŸ”—

@@ -1,5 +1,5 @@
-Ā  …Ā                                                   Ā  …Ā                                                   
-Ā  …Ā                                                   Ā  …Ā                                                   
-Ā  …Ā                                                   Ā  …Ā                                                   
-Ā  …Ā                                                   Ā  …Ā                                                   
-Ā  …Ā                                                   Ā  …Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   

internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf16.golden šŸ”—

@@ -1,5 +1,5 @@
-Ā  …Ā                                                   Ā  …Ā                                                   
-Ā  …Ā                                                   Ā  …Ā                                                   
-Ā  …Ā                                                   Ā  …Ā                                                   
-Ā  …Ā                                                   Ā  …Ā                                                   
-Ā  …Ā                                                   Ā  …Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   
+Ā   Ā                                                   Ā   Ā                                                   
+Ā   Ā                                                   Ā   Ā