Esempio n. 1
0
/*
 * The command make the next window (next => down the screen) the current
 * window. There are no real errors, although the command does nothing if
 * there is only 1 window on the screen. Bound to "C-X C-N"
 */
int nextwind(int f, int n)
{
  WINDOW *wp;

  if ((wp = curwp->w_wndp) == NULL)
    wp = wheadp;

  curwp = wp;
  curbp = wp->w_bufp;
  upmode();
  return (TRUE);
}
Esempio n. 2
0
/*
 * This command makes the previous window (previous => up the screen) the
 * current window. There arn't any errors, although the command does not do a
 * lot if there is 1 window
 */
int prevwind(int f, int n)
{
  WINDOW *wp1, *wp2;

  wp1 = wheadp;
  wp2 = curwp;

  if (wp1 == wp2)
    wp2 = NULL;

  while (wp1->w_wndp != wp2)
    wp1 = wp1->w_wndp;

  curwp = wp1;
  curbp = wp1->w_bufp;
  upmode();
  return (TRUE);
}
Esempio n. 3
0
/* 
 * invert buffer read only status
 */
int togglereadonly(int f, int n)
{
  curwp->w_bufp->b_flag ^= BFRO;
  upmode();
  return TRUE;
}