#!/usr/bin/env ruby # encoding: UTF-8 require 'curses' require 'optparse' $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) def parse_options options = {} parser = OptionParser.new do |opts| opts.banner = < options[:convert_tabs], :undo_stack_size => options[:undo_stack_size], :lines => screen.lines, :columns => screen.columns ) screen.draw *app.display_info Keyboard.input do Curses.getch end Keyboard.output do |key| screen.debug_key(key) if options[:debug_keys] if key == :resize app.resize(screen.lines, screen.columns) screen.clear_cache else result = app.key key break if result == :quit end screen.draw *app.display_info end end