diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-01-29 13:30:15 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-01-29 13:30:15 +0800 |
commit | 25ab88da2f3b6244c861c859999f658fc4c2990e (patch) | |
tree | 4b03bd0d003ef63b880a031ed657b4a3cbf7d145 /mbbsd | |
parent | 4ddf389fb92b92887e3c65f0d26261be3b387708 (diff) | |
download | pttbbs-25ab88da2f3b6244c861c859999f658fc4c2990e.tar pttbbs-25ab88da2f3b6244c861c859999f658fc4c2990e.tar.gz pttbbs-25ab88da2f3b6244c861c859999f658fc4c2990e.tar.bz2 pttbbs-25ab88da2f3b6244c861c859999f658fc4c2990e.tar.lz pttbbs-25ab88da2f3b6244c861c859999f658fc4c2990e.tar.xz pttbbs-25ab88da2f3b6244c861c859999f658fc4c2990e.tar.zst pttbbs-25ab88da2f3b6244c861c859999f658fc4c2990e.zip |
- read: make cursor default position before .DIR.bottom articles
- board: yank shall not work outside myfavorite. 'addfav' should not work outside myfavorite.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3882 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/board.c | 6 | ||||
-rw-r--r-- | mbbsd/read.c | 5 |
2 files changed, 7 insertions, 4 deletions
diff --git a/mbbsd/board.c b/mbbsd/board.c index 178bd212..2a4b3dd5 100644 --- a/mbbsd/board.c +++ b/mbbsd/board.c @@ -49,6 +49,8 @@ static char yank_flag = 1; static time4_t last_save_fav_and_brc; /* These are all the states yank_flag may be. */ +// XXX IS_LISTING_FAV() does not mean we are in favorite. +// That is controlled by IN_FAVORITE(). #define LIST_FAV() (yank_flag = 0) #define LIST_BRD() (yank_flag = 1) #define IS_LISTING_FAV() (yank_flag == 0) @@ -1607,7 +1609,7 @@ choose_board(int newflag) // MyFav Functionality (Require PERM_BASIC) /////////////////////////////////////////////////////// case 'y': - if (HasFavEditPerm()) { + if (HasFavEditPerm() && IN_FAVORITE()) { if (get_current_fav() != NULL || !IS_LISTING_FAV()){ yank_flag ^= 1; /* FAV <=> BRD */ } @@ -1767,7 +1769,7 @@ choose_board(int newflag) case 'a': case 'i': - if(IS_LISTING_FAV() && HasFavEditPerm()){ + if(IN_FAVORITE() && HasFavEditPerm()){ char bname[IDLEN + 1]; int bid; move(0, 0); diff --git a/mbbsd/read.c b/mbbsd/read.c index 753b595d..52f010ee 100644 --- a/mbbsd/read.c +++ b/mbbsd/read.c @@ -1230,7 +1230,8 @@ i_read(int cmdmode, const char *direct, void (*dotitle) (), if (mode == NEWDIRECT) { int num; num = last_line - p_lines + 1; - locmem = getkeep(currdirect, num < 1 ? 1 : num, last_line); + locmem = getkeep(currdirect, num < 1 ? 1 : num, + bottom_line ? bottom_line : last_line); if(newdirect_new_ln >= 0) { locmem->crs_ln = newdirect_new_ln + 1; @@ -1272,7 +1273,7 @@ i_read(int cmdmode, const char *direct, void (*dotitle) (), recbase = 1; locmem->top_ln = recbase; } - /* XXX if entries return -1 */ + /* XXX if entries return -1 or black-hole */ entries = get_records_and_bottom(currdirect, headers, recbase, headers_size, last_line, bottom_line); } |