Ncurses.stdscr.keypad 1
Ncurses.curs_set 0
Ncurses.start_color
+ $cursing = true
end
def stop_cursing
+ return unless $cursing
Ncurses.curs_set 1
Ncurses.echo
Ncurses.endwin
end
end
-Redwood::start
-Index.load
+begin
+ Redwood::start
+ Index.load
-if(s = Index.source_for DraftManager.source_name)
- DraftManager.source = s
-else
- Index.add_source DraftManager.new_source
-end
+ if(s = Index.source_for DraftManager.source_name)
+ DraftManager.source = s
+ else
+ Index.add_source DraftManager.new_source
+ end
-if(s = Index.source_for SentManager.source_name)
- SentManager.source = s
-else
- Index.add_source SentManager.new_source
-end
+ if(s = Index.source_for SentManager.source_name)
+ SentManager.source = s
+ else
+ Index.add_source SentManager.new_source
+ end
-begin
log "starting curses"
start_cursing
Redwood::finish
stop_cursing
- if SuicideManager.die?
+ if SuicideManager.instantiated? && SuicideManager.die?
Redwood::log "I've been asked to commit sepuku. I obey!"
end