From 138700c568dbbd462c0a9b92e89414569c87c369 Mon Sep 17 00:00:00 2001 From: Yusuf Malikul Mulki Date: Sat, 3 Dec 2022 19:28:42 +0700 Subject: [PATCH 1/2] Fix Typo --- paginator/paginator.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paginator/paginator.go b/paginator/paginator.go index 8ea45316..4ddfdaaa 100644 --- a/paginator/paginator.go +++ b/paginator/paginator.go @@ -81,7 +81,7 @@ func (m *Model) SetTotalPages(items int) int { return n } -// ItemsOnPage is a helper function for returning the numer of items on the +// ItemsOnPage is a helper function for returning the number of items on the // current page given the total numer of items passed as an argument. func (m Model) ItemsOnPage(totalItems int) int { if totalItems < 1 { From cc4879e03aa9034f3bff74c477b3e88cc11d581f Mon Sep 17 00:00:00 2001 From: yusufmalikul Date: Sun, 4 Dec 2022 09:19:58 +0700 Subject: [PATCH 2/2] fix typo --- paginator/paginator.go | 2 +- table/table.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/paginator/paginator.go b/paginator/paginator.go index 4ddfdaaa..17a1950e 100644 --- a/paginator/paginator.go +++ b/paginator/paginator.go @@ -82,7 +82,7 @@ func (m *Model) SetTotalPages(items int) int { } // ItemsOnPage is a helper function for returning the number of items on the -// current page given the total numer of items passed as an argument. +// current page given the total number of items passed as an argument. func (m Model) ItemsOnPage(totalItems int) int { if totalItems < 1 { return 0 diff --git a/table/table.go b/table/table.go index 60c8a005..83bb01e4 100644 --- a/table/table.go +++ b/table/table.go @@ -247,7 +247,7 @@ func (m *Model) UpdateViewport() { // Render only rows from: m.cursor-m.viewport.Height to: m.cursor+m.viewport.Height // Constant runtime, independent of number of rows in a table. - // Limits the numer of renderedRows to a maximum of 2*m.viewport.Height + // Limits the number of renderedRows to a maximum of 2*m.viewport.Height if m.cursor >= 0 { m.start = clamp(m.cursor-m.viewport.Height, 0, m.cursor) } else {