From 30998513bad3ddb3e5a2534d183e0d3059f91886 Mon Sep 17 00:00:00 2001 From: Yusuf Malikul Mulki Date: Thu, 19 Jan 2023 12:20:02 +0700 Subject: [PATCH] ypo (#300) --- paginator/paginator.go | 4 ++-- table/table.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/paginator/paginator.go b/paginator/paginator.go index 8ea4531..17a1950 100644 --- a/paginator/paginator.go +++ b/paginator/paginator.go @@ -81,8 +81,8 @@ func (m *Model) SetTotalPages(items int) int { return n } -// ItemsOnPage is a helper function for returning the numer of items on the -// current page given the total numer of items passed as an argument. +// ItemsOnPage is a helper function for returning the number of items on the +// 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 60c8a00..83bb01e 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 {