Method: Curses.close_screen

Defined in:
ext/curses/curses.c

.close_screenObject

A program should always call Curses.close_screen before exiting or escaping from curses mode temporarily. This routine restores tty modes, moves the cursor to the lower left-hand corner of the screen and resets the terminal into the proper non-visual mode.

Calling Curses.refresh or Curses.doupdate after a temporary escape causes the program to resume visual mode.



350
351
352
353
354
355
356
357
358
359
360
# File 'ext/curses/curses.c', line 350

static VALUE
curses_close_screen(VALUE self)
{
    curses_stdscr();
#ifdef HAVE_ISENDWIN
    if (!isendwin())
#endif
  endwin();
    rb_stdscr = 0;
    return Qnil;
}