Fix the line counter

This commit is contained in:
Sameer Rahmani 2022-11-24 17:36:15 +00:00
parent 944c43b396
commit 49465bb6f1
1 changed files with 1 additions and 1 deletions

View File

@ -59,7 +59,7 @@ func drawText(s tcell.Screen, x1, y1, x2, y2 int, style tcell.Style, text string
// Main render function that gets called during the event loop.
func Render(s tcell.Screen, inputs Items, lowerBound int, upperBound int, current int) {
y := 2
status := fmt.Sprintf("Navigation: [UP or C-p] [Down or C-n] | Select: SPACE | Cancel: [q ESC] | Done: [Enter] | Line: %d", current)
status := fmt.Sprintf("Navigation: [UP or C-p] [Down or C-n] | Select: SPACE | Cancel: [q ESC] | Done: [Enter] | Line: %d", current+1)
drawText(s, 0, 0, xmax-1, 1, helpStyle, status)
for i, item := range (*inputs)[lowerBound:upperBound] {
style := tcell.StyleDefault