diff options
| author | B. Watson <urchlay@slackware.uk> | 2026-03-15 02:52:25 -0400 |
|---|---|---|
| committer | B. Watson <urchlay@slackware.uk> | 2026-03-15 02:52:25 -0400 |
| commit | 5778ecac27a763bc19ef52b5b99c8cc06bb0fa7b (patch) | |
| tree | e3979fd82c0fe5d2ae688c336a6df232e8a49f76 /src/irc.c | |
| parent | de94023547c353fccbe5d39a021d78761a6dd31f (diff) | |
| download | fujinet-chat-5778ecac27a763bc19ef52b5b99c8cc06bb0fa7b.tar.gz | |
Start+A searches from right to left (so [server] isn't constantly coming up).
Diffstat (limited to 'src/irc.c')
| -rw-r--r-- | src/irc.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -782,10 +782,12 @@ static char cur_is_query(void) { } */ -char find_scr(int status) { - char i; +/* count backwards here, because the [server] screen is 0, it's + the least interesting one. */ +char find_scr_with_status(int status) { + signed char i; - for(i = 0; i < MAX_SCREENS; i++) { + for(i = MAX_SCREENS - 1; i != -1; i--) { if(scr_status[i] == status) { return i; } @@ -796,9 +798,9 @@ char find_scr(int status) { void switch_to_active() { char i; - i = find_scr(SCR_HILITE); + i = find_scr_with_status(SCR_HILITE); if(i == 0xff) - i = find_scr(SCR_ACTIVE); + i = find_scr_with_status(SCR_ACTIVE); if(i != 0xff) { scr_prev = scr_current; scr_display(i); |
