Fixed the "switch to next screen" command (normally bound to the

key "print scrn".
It used to stop at the first non-open vty, now it skips the non-open
ones and thereby enable one to cycle around all open vty by pressing
"print scrn".
This commit is contained in:
Søren Schmidt 1997-01-30 15:12:17 +00:00
parent 50c193eb05
commit ac59a2c67c
3 changed files with 30 additions and 3 deletions

View File

@ -3018,7 +3018,16 @@ next_code:
metas = 1;
break;
case NEXT:
switch_scr(cur_console, (get_scr_num() + 1) % MAXCONS);
{
int next, this = get_scr_num();
for (next = this+1; next != this; next = (next+1)%MAXCONS) {
struct tty *tp = VIRTUAL_TTY(next);
if (tp->t_state & TS_ISOPEN) {
switch_scr(cur_console, next);
break;
}
}
}
break;
case BTAB:
return(BKEY);

View File

@ -3018,7 +3018,16 @@ next_code:
metas = 1;
break;
case NEXT:
switch_scr(cur_console, (get_scr_num() + 1) % MAXCONS);
{
int next, this = get_scr_num();
for (next = this+1; next != this; next = (next+1)%MAXCONS) {
struct tty *tp = VIRTUAL_TTY(next);
if (tp->t_state & TS_ISOPEN) {
switch_scr(cur_console, next);
break;
}
}
}
break;
case BTAB:
return(BKEY);

View File

@ -3018,7 +3018,16 @@ next_code:
metas = 1;
break;
case NEXT:
switch_scr(cur_console, (get_scr_num() + 1) % MAXCONS);
{
int next, this = get_scr_num();
for (next = this+1; next != this; next = (next+1)%MAXCONS) {
struct tty *tp = VIRTUAL_TTY(next);
if (tp->t_state & TS_ISOPEN) {
switch_scr(cur_console, next);
break;
}
}
}
break;
case BTAB:
return(BKEY);