From dc1aa6e3ab5afa10d91e1ea75c08d613ce65a5ed Mon Sep 17 00:00:00 2001 From: piaip Date: Wed, 8 Jul 2009 23:31:12 +0000 Subject: * tree selection in announce: do not enter last entry (simply move to it) git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4731 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/announce.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'mbbsd') diff --git a/mbbsd/announce.c b/mbbsd/announce.c index ed1e7cea..50a381d1 100644 --- a/mbbsd/announce.c +++ b/mbbsd/announce.c @@ -1263,9 +1263,9 @@ a_menu_rec(const char *maintitle, const char *path, } } - if (preselect) + if (preselect && *preselect && preselect[1]) { - // enter if preselect is folder + // if this is not the last preselect entry, enter it ch = KEY_ENTER; } else { ch = cursor_key(2 + me.now - me.page, 0); @@ -1275,6 +1275,7 @@ a_menu_rec(const char *maintitle, const char *path, break; // maybe we should let 1-9=simple search and z=tree-search + // TODO let 'z' prefix means 'back to root' if ((ch >= '1' && ch <= '9') || ch == 'z' || ch == 'Q') { int n = a_multi_search_num(isascii(ch) && isdigit(ch) ? ch : '\0', sess); me.page = A_INVALID_PAGE; -- cgit v1.2.3