From 5fbd8b165702a3bbca53109b7918d415941b7344 Mon Sep 17 00:00:00 2001 From: Braiden Vasco Date: Fri, 21 Jul 2017 12:12:16 +0000 Subject: [PATCH] Display more info --- lib/main.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/main.rb b/lib/main.rb index 1fdb70f..cc522b6 100644 --- a/lib/main.rb +++ b/lib/main.rb @@ -86,7 +86,7 @@ private def render Curses.clear - @items[@top...(@top + Curses.stdscr.maxy)].each_with_index do |item, index| + @items.each_with_index.to_a[@top...(@top + Curses.stdscr.maxy)].each do |item, index| if index == @active Curses.attron Curses.color_pair 2 else @@ -94,7 +94,7 @@ private end Curses.setpos index, 0 - Curses.addstr item.ljust Curses.stdscr.maxx + Curses.addstr "#{index}: #{item}".ljust Curses.stdscr.maxx end Curses.refresh