# File lib/luck/ansi.rb, line 211 def undo_modes # restore previous terminal mode $stdout.ioctl(TCSETS, @old_modes.pack("IIIICCA*")) print "\e[2J" # clear screen print "\e[H" # go home print "\e[?47l" # kick xterm back into the normal screen print "\e[?1000l" # turn off mouse reporting self.linedrawing = false self.cursor = true # show the mouse flush end