on main help sign in
fix(diffview): do not print ellipsis after content has being fully printed
c5bf830Andrey Nering
internal/exp/diffview/diffview.go+2−2
@@ -539,11 +539,11 @@ outer:
539
539
540 for printedLines < dv.height {
540 for printedLines < dv.height {
541 if dv.lineNumbers {
541 if dv.lineNumbers {
542− write(dv.style.MissingLine.LineNumber.Render(pad("…", dv.beforeNumDigits)))
542+ write(dv.style.MissingLine.LineNumber.Render(pad(" ", dv.beforeNumDigits)))
543 }
543 }
544 write(dv.style.MissingLine.Code.Width(dv.fullCodeWidth).Render(" "))
544 write(dv.style.MissingLine.Code.Width(dv.fullCodeWidth).Render(" "))
545 if dv.lineNumbers {
545 if dv.lineNumbers {
546− write(dv.style.MissingLine.LineNumber.Render(pad("…", dv.afterNumDigits)))
546+ write(dv.style.MissingLine.LineNumber.Render(pad(" ", dv.afterNumDigits)))
547 }
547 }
548 write(dv.style.MissingLine.Code.Width(dv.fullCodeWidth + btoi(dv.extraColOnAfter)).Render(" "))
548 write(dv.style.MissingLine.Code.Width(dv.fullCodeWidth + btoi(dv.extraColOnAfter)).Render(" "))
549 write("\n")
549 write("\n")
internal/exp/diffview/testdata/TestDiffViewHeight/Split/DarkMode/HeightOf016.golden+1−1
@@ -13,4 +13,4 @@
13 12 -  return "Hello, world!"  13 +  content := strings.ToUpper("Hello, World!") 
13 12 -  return "Hello, world!"  13 +  content := strings.ToUpper("Hello, World!") 
14      14 +  return content 
14      14 +  return content 
15 13  }  15  } 
15 13  }  15  } 
16−  …     …   
16+          
internal/exp/diffview/testdata/TestDiffViewHeight/Split/DarkMode/HeightOf017.golden+2−2
@@ -13,5 +13,5 @@
13 12 -  return "Hello, world!"  13 +  content := strings.ToUpper("Hello, World!") 
13 12 -  return "Hello, world!"  13 +  content := strings.ToUpper("Hello, World!") 
14      14 +  return content 
14      14 +  return content 
15 13  }  15  } 
15 13  }  15  } 
16−  …     …   
16+          
17−  …     …   
17+          
internal/exp/diffview/testdata/TestDiffViewHeight/Split/DarkMode/HeightOf018.golden+3−3
@@ -13,6 +13,6 @@
13 12 -  return "Hello, world!"  13 +  content := strings.ToUpper("Hello, World!") 
13 12 -  return "Hello, world!"  13 +  content := strings.ToUpper("Hello, World!") 
14      14 +  return content 
14      14 +  return content 
15 13  }  15  } 
15 13  }  15  } 
16−  …     …   
16+          
17−  …     …   
17+          
18−  …     …   
18+          
internal/exp/diffview/testdata/TestDiffViewHeight/Split/DarkMode/HeightOf019.golden+4−4
@@ -13,7 +13,7 @@
13 12 -  return "Hello, world!"  13 +  content := strings.ToUpper("Hello, World!") 
13 12 -  return "Hello, world!"  13 +  content := strings.ToUpper("Hello, World!") 
14      14 +  return content 
14      14 +  return content 
15 13  }  15  } 
15 13  }  15  } 
16−  …     …   
16+          
17−  …     …   
17+          
18−  …     …   
18+          
19−  …     …   
19+          
internal/exp/diffview/testdata/TestDiffViewHeight/Split/DarkMode/HeightOf020.golden+5−5
@@ -13,8 +13,8 @@
13 12 -  return "Hello, world!"  13 +  content := strings.ToUpper("Hello, World!") 
13 12 -  return "Hello, world!"  13 +  content := strings.ToUpper("Hello, World!") 
14      14 +  return content 
14      14 +  return content 
15 13  }  15  } 
15 13  }  15  } 
16−  …     …   
16+          
17−  …     …   
17+          
18−  …     …   
18+          
19−  …     …   
19+          
20−  …     …   
20+          
internal/exp/diffview/testdata/TestDiffViewHeight/Split/LightMode/HeightOf016.golden+1−1
@@ -13,4 +13,4 @@
13 12 -  return "Hello, world!"  13 +  content := strings.ToUpper("Hello, World!") 
13 12 -  return "Hello, world!"  13 +  content := strings.ToUpper("Hello, World!") 
14      14 +  return content 
14      14 +  return content 
15 13  }  15  } 
15 13  }  15  } 
16−  …     …   
16+          
internal/exp/diffview/testdata/TestDiffViewHeight/Split/LightMode/HeightOf017.golden+2−2
@@ -13,5 +13,5 @@
13 12 -  return "Hello, world!"  13 +  content := strings.ToUpper("Hello, World!") 
13 12 -  return "Hello, world!"  13 +  content := strings.ToUpper("Hello, World!") 
14      14 +  return content 
14      14 +  return content 
15 13  }  15  } 
15 13  }  15  } 
16−  …     …   
16+          
17−  …     …   
17+          
internal/exp/diffview/testdata/TestDiffViewHeight/Split/LightMode/HeightOf018.golden+3−3
@@ -13,6 +13,6 @@
13 12 -  return "Hello, world!"  13 +  content := strings.ToUpper("Hello, World!") 
13 12 -  return "Hello, world!"  13 +  content := strings.ToUpper("Hello, World!") 
14      14 +  return content 
14      14 +  return content 
15 13  }  15  } 
15 13  }  15  } 
16−  …     …   
16+          
17−  …     …   
17+          
18−  …     …   
18+          
internal/exp/diffview/testdata/TestDiffViewHeight/Split/LightMode/HeightOf019.golden+4−4
@@ -13,7 +13,7 @@
13 12 -  return "Hello, world!"  13 +  content := strings.ToUpper("Hello, World!") 
13 12 -  return "Hello, world!"  13 +  content := strings.ToUpper("Hello, World!") 
14      14 +  return content 
14      14 +  return content 
15 13  }  15  } 
15 13  }  15  } 
16−  …     …   
16+          
17−  …     …   
17+          
18−  …     …   
18+          
19−  …     …   
19+          
internal/exp/diffview/testdata/TestDiffViewHeight/Split/LightMode/HeightOf020.golden+5−5
@@ -13,8 +13,8 @@
13 12 -  return "Hello, world!"  13 +  content := strings.ToUpper("Hello, World!") 
13 12 -  return "Hello, world!"  13 +  content := strings.ToUpper("Hello, World!") 
14      14 +  return content 
14      14 +  return content 
15 13  }  15  } 
15 13  }  15  } 
16−  …     …   
16+          
17−  …     …   
17+          
18−  …     …   
18+          
19−  …     …   
19+          
20−  …     …   
20+          
internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf11.golden+1−1
@@ -2,4 +2,4 @@
2 12 -  return "Hello, world!"  13 +  content := strings.ToUpper("Hello, World!") 
2 12 -  return "Hello, world!"  13 +  content := strings.ToUpper("Hello, World!") 
3      14 +  return content 
3      14 +  return content 
4 13  }  15  } 
4 13  }  15  } 
5−  …     …   
5+          
internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf12.golden+2−2
@@ -1,5 +1,5 @@
1 12 -  return "Hello, world!"  13 +  content := strings.ToUpper("Hello, World!") 
1 12 -  return "Hello, world!"  13 +  content := strings.ToUpper("Hello, World!") 
2      14 +  return content 
2      14 +  return content 
3 13  }  15  } 
3 13  }  15  } 
4−  …     …   
4+          
5−  …     …   
5+          
internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf13.golden+3−3
@@ -1,5 +1,5 @@
1      14 +  return content 
1      14 +  return content 
2 13  }  15  } 
2 13  }  15  } 
3−  …     …   
3+          
4−  …     …   
4+          
5−  …     …   
5+          
internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf14.golden+4−4
@@ -1,5 +1,5 @@
1 13  }  15  } 
1 13  }  15  } 
2−  …     …   
2+          
3−  …     …   
3+          
4−  …     …   
4+          
5−  …     …   
5+          
internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf15.golden+5−5
@@ -1,5 +1,5 @@
1−  …     …   
1+          
2−  …     …   
2+          
3−  …     …   
3+          
4−  …     …   
4+          
5−  …     …   
5+          
internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf16.golden+5−5
@@ -1,5 +1,5 @@
1−  …     …   
1+          
2−  …     …   
2+          
3−  …     …   
3+          
4−  …     …   
4+          
5−  …     …   
5+