Method: Curses.setscrreg
- Defined in:
- ext/curses/curses.c
.setscrreg(top, bottom) ⇒ Object
call-seq:
setscrreg(top, bottom)
Set a software scrolling region in a window. top and bottom are lines numbers of the margin.
If this option and Curses.scrollok are enabled, an attempt to move off the bottom margin line causes all lines in the scrolling region to scroll one line in the direction of the first line. Only the text of the window is scrolled.
1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 |
# File 'ext/curses/curses.c', line 1060
static VALUE
curses_setscrreg(VALUE obj, VALUE top, VALUE bottom)
{
/* may have to raise exception on ERR */
#ifdef HAVE_SETSCRREG
curses_stdscr();
return (setscrreg(NUM2INT(top), NUM2INT(bottom)) == OK) ? Qtrue : Qfalse;
#else
return Qfalse;
#endif
}
|