/*
* This command makes the current
* window the only window on the screen.
* Bound to "C-X 1". Try to set the framing
* so that "." does not have to move on
* the display. Some care has to be taken
* to keep the values of dot and mark
* in the buffer structures right if the
* distruction of a window makes a buffer
* become undisplayed.
*/
ovmain(x, f, n)
{
register WINDOW *wp;
register LINE *lp;
register int i;
if ( x == 1 ) return ( reposition( f, n ));
if ( x == 2 ) return ( refresh( f, n ));
/*
* Reposition dot in the current
* window to line "n". If the argument is
* positive, it is that line. If it is negative it
* is that line from the bottom. If it is 0 the window
* is centered (this is what the standard redisplay code
* does). With no argument it defaults to 1. Bound to
* M-!. Because of the default, it works like in
* Gosling.
*/
reposition(f, n)
{
curwp->w_force = n;
curwp->w_flag |= WFFORCE;
return (TRUE);
}
/*
* Refresh the screen. With no
* argument, it just does the refresh. With an
* argument it recenters "." in the current
* window. Bound to "C-L".
*/
refresh(f, n)
{
if (f == FALSE)
{ curwp->w_flag |= WFHARD | WFFORCE;
sgarbf = TRUE;
}
else
{ curwp->w_force = 0; /* Center dot. */
curwp->w_flag |= WFFORCE;
}
return (TRUE);
}