diff options
author | Stefan Haller <stefan@haller-berlin.de> | 2023-08-18 08:28:22 +0200 |
---|---|---|
committer | Stefan Haller <stefan@haller-berlin.de> | 2023-08-28 14:21:06 +0200 |
commit | 7953f7fa865df345bcbcdf5ae566bfb828d98086 (patch) | |
tree | 30657199ee7ec7ac6b5e2d898d7c36f498fdf7ed /pkg/gui | |
parent | 7a8df7795c2381cb1b94411fcdd8542739026934 (diff) |
Make RenderDisplayStrings return the column positions
Not used by anything yet, but we'll need it later in this branch.
Diffstat (limited to 'pkg/gui')
-rw-r--r-- | pkg/gui/context/list_renderer.go | 2 | ||||
-rw-r--r-- | pkg/gui/presentation/commits_test.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/pkg/gui/context/list_renderer.go b/pkg/gui/context/list_renderer.go index 40562a599..cca5a6c77 100644 --- a/pkg/gui/context/list_renderer.go +++ b/pkg/gui/context/list_renderer.go @@ -23,7 +23,7 @@ func (self *ListRenderer) renderLines(startIdx int, endIdx int) string { if self.getColumnAlignments != nil { columnAlignments = self.getColumnAlignments() } - lines := utils.RenderDisplayStrings( + lines, _ := utils.RenderDisplayStrings( self.getDisplayStrings(startIdx, utils.Min(endIdx, self.list.Len())), columnAlignments) return strings.Join(lines, "\n") diff --git a/pkg/gui/presentation/commits_test.go b/pkg/gui/presentation/commits_test.go index 5167681cd..16f1de660 100644 --- a/pkg/gui/presentation/commits_test.go +++ b/pkg/gui/presentation/commits_test.go @@ -422,7 +422,7 @@ func TestGetCommitListDisplayStrings(t *testing.T) { s.showYouAreHereLabel, ) - renderedLines := utils.RenderDisplayStrings(result, nil) + renderedLines, _ := utils.RenderDisplayStrings(result, nil) renderedResult := strings.Join(renderedLines, "\n") t.Logf("\n%s", renderedResult) |