diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-04-13 01:20:08 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-04-13 01:20:08 +0800 |
commit | ba7d0724d84952fd0989b99ba5e9ef42d8b8f262 (patch) | |
tree | 4c8cfec674e0a163289835ed19d50d62de5b4a5e /mbbsd | |
parent | 050df9b137cf1be6876e551a5a98c1038be73b50 (diff) | |
download | pttbbs-ba7d0724d84952fd0989b99ba5e9ef42d8b8f262.tar pttbbs-ba7d0724d84952fd0989b99ba5e9ef42d8b8f262.tar.gz pttbbs-ba7d0724d84952fd0989b99ba5e9ef42d8b8f262.tar.bz2 pttbbs-ba7d0724d84952fd0989b99ba5e9ef42d8b8f262.tar.lz pttbbs-ba7d0724d84952fd0989b99ba5e9ef42d8b8f262.tar.xz pttbbs-ba7d0724d84952fd0989b99ba5e9ef42d8b8f262.tar.zst pttbbs-ba7d0724d84952fd0989b99ba5e9ef42d8b8f262.zip |
- board: move cursor when leaving same board.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4149 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/bbs.c | 7 | ||||
-rw-r--r-- | mbbsd/board.c | 8 |
2 files changed, 11 insertions, 4 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c index 5baf189e..40c70a89 100644 --- a/mbbsd/bbs.c +++ b/mbbsd/bbs.c @@ -4046,19 +4046,24 @@ Read(void) return 0; } -void +int ReadSelect(void) { int mode0 = currutmp->mode; int stat0 = currstat; + int changed = 0; currstat = SELECT; if (do_select() == NEWDIRECT) + { Read(); + changed = 1; + } // no need to set utmpbid here... // setutmpbid(0); currutmp->mode = mode0; currstat = stat0; + return changed; } #ifdef LOG_BOARD diff --git a/mbbsd/board.c b/mbbsd/board.c index d6816ff0..b9fcdbf7 100644 --- a/mbbsd/board.c +++ b/mbbsd/board.c @@ -1548,15 +1548,17 @@ choose_board(int newflag) break; case 's': { - int cbid = currbid; + // XXX TODO + // 現在這樣搜不到群組... + // // try global search instead. - ReadSelect(); + int trysearch = ReadSelect(); // restore my mode setutmpmode(newflag ? READNEW : READBRD); // force refresh head = -1; // try to match cursor if we can. - if (cbid != currbid && currbid && currboard) + if (trysearch && currboard) { if ((tmp = search_board(currboard)) != -1) num = tmp; |