Fix the line counter
This commit is contained in:
parent
944c43b396
commit
49465bb6f1
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue