end
Thread.abort_on_exception = true # make debugging possible
+Thread.current.priority = 1 # keep ui responsive
module Redwood
lmode.on_kill { Logger.clear! }
Logger.add_sink lmode
Logger.force_message "Welcome to Sup! Log level is set to #{Logger.level}."
+ if Logger::LEVELS.index(Logger.level) > 0
+ Logger.force_message "For more verbose logging, restart with SUP_LOG_LEVEL=#{Logger::LEVELS[Logger::LEVELS.index(Logger.level)-1]}."
+ end
debug "initializing inbox buffer"
imode = InboxMode.new
until Redwood::exceptions.nonempty? || $die
c = begin
Ncurses.nonblocking_getch
- rescue Interrupt => e
+ rescue Interrupt
raise if BufferManager.ask_yes_or_no "Die ungracefully now?"
BufferManager.draw_screen
nil