Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions lib/eclair/grid.rb
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,23 @@ def action
end

def resize
Curses.clear
@scroll.fill(0)
@cell_width = Curses.stdscr.maxx/config.columns
@maxy = Curses.stdscr.maxy - @header_rows
rescroll(*@cursor)
draw_all
begin
Curses.clear
@scroll.fill(0)
@cell_width = Curses.stdscr.maxx/config.columns
@maxy = Curses.stdscr.maxy - @header_rows
rescroll(*@cursor)
draw_all
rescue => e
log_error(e)
end
end

def log_error(error)
File.open("error.log", "a") do |file|
file.puts("#{Time.now}: #{error.message}")
file.puts(error.backtrace)
end
end

def transit_mode to
Expand Down