diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-06-07 14:59:18 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-06-07 14:59:18 +0800 |
commit | 90ef4098f355012c5800c4b3f7f03ce41448a9cc (patch) | |
tree | 979062e3209622ae8cce1244bfb917da864a1496 | |
parent | ced38173e03764ba744e554c362753bbc98ab3a3 (diff) | |
download | pttbbs-90ef4098f355012c5800c4b3f7f03ce41448a9cc.tar pttbbs-90ef4098f355012c5800c4b3f7f03ce41448a9cc.tar.gz pttbbs-90ef4098f355012c5800c4b3f7f03ce41448a9cc.tar.bz2 pttbbs-90ef4098f355012c5800c4b3f7f03ce41448a9cc.tar.lz pttbbs-90ef4098f355012c5800c4b3f7f03ce41448a9cc.tar.xz pttbbs-90ef4098f355012c5800c4b3f7f03ce41448a9cc.tar.zst pttbbs-90ef4098f355012c5800c4b3f7f03ce41448a9cc.zip |
pmore: make wrapmode navigation more accurate when goBottom.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2784 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | mbbsd/pmore.c | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/mbbsd/pmore.c b/mbbsd/pmore.c index 51ae1375..8c3b45a4 100644 --- a/mbbsd/pmore.c +++ b/mbbsd/pmore.c @@ -43,6 +43,7 @@ #define PMORE_USE_DBCS_WRAP // safer wrap for DBCS. #define PMORE_USE_ASCII_MOVIE // support ascii movie #define PMORE_WORKAROUND_POORTERM // try to work with poor terminal sys +#define PMORE_ACCURATE_WRAPEND // try more harder to find file end in wrap mode #define PMORE_TRADITIONAL_PROMPTEND // when prompt=NA, show only page 1 #define PMORE_TRADITIONAL_FULLCOL // to work with traditional ascii arts @@ -1440,6 +1441,7 @@ pmore(char *fpath, int promptend) { int flExit = 0, retval = 0; int ch = 0; + int invalidate = 1; #ifdef PMORE_USE_ASCII_MOVIE float frameclk = 1.0f; @@ -1471,7 +1473,16 @@ pmore(char *fpath, int promptend) clear(); while(!flExit) { - mf_display(); + if(invalidate) + { + mf_display(); + invalidate = 0; + } + + /* in current implementation, + * we want to invalidate for each keypress. + */ + invalidate = 1; #ifdef PMORE_TRADITIONAL_PROMPTEND if(promptend == NA) // && mf_viewedAll()) @@ -1797,6 +1808,22 @@ pmore(char *fpath, int promptend) case 'G': case KEY_END: mf_goBottom(); + +#ifdef PMORE_ACCURATE_WRAPEND + /* allright. in design of pmore, + * it's possible that when user navigates to file end, + * a wrapped line made nav not 100%. + */ + mf_display(); + invalidate = 0; + + if(!mf_viewedAll()) + { + /* one more try. */ + mf_goBottom(); + invalidate = 1; + } +#endif break; /* Compound Navigation */ |