diff options
author | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-04-27 21:55:39 +0800 |
---|---|---|
committer | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-04-27 21:55:39 +0800 |
commit | 7fb4d7c51f5a7177d8f38a4956f40a2ed1fa199e (patch) | |
tree | 4b45ed377fe39afd39598c803ef1c2bf95072b95 /mbbsd | |
parent | 669158ebbf8b97b044bb2735bee11c533470805b (diff) | |
download | pttbbs-7fb4d7c51f5a7177d8f38a4956f40a2ed1fa199e.tar pttbbs-7fb4d7c51f5a7177d8f38a4956f40a2ed1fa199e.tar.gz pttbbs-7fb4d7c51f5a7177d8f38a4956f40a2ed1fa199e.tar.bz2 pttbbs-7fb4d7c51f5a7177d8f38a4956f40a2ed1fa199e.tar.lz pttbbs-7fb4d7c51f5a7177d8f38a4956f40a2ed1fa199e.tar.xz pttbbs-7fb4d7c51f5a7177d8f38a4956f40a2ed1fa199e.tar.zst pttbbs-7fb4d7c51f5a7177d8f38a4956f40a2ed1fa199e.zip |
hobit problem fixed cursor position
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1873 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/read.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/mbbsd/read.c b/mbbsd/read.c index 7737f632..b2f001d0 100644 --- a/mbbsd/read.c +++ b/mbbsd/read.c @@ -409,18 +409,20 @@ i_read_key(onekey_t * rcmdlist, keeploc_t * locmem, int bid, int bottom_line) { int mode = DONOTHING; - int num; + int num, new_top=10; char direct[60]; static char default_ch=0; int ch, new_ln= locmem->crs_ln, lastmode=0; do { - if((mode=cursor_pos(locmem, new_ln, 10))!=DONOTHING) + if((mode=cursor_pos(locmem, new_ln, new_top))!=DONOTHING) return mode; if(default_ch) ch = default_ch; else ch = igetch(); + + new_top = 10; // default 10 switch (ch) { case '0': case '1': @@ -505,11 +507,13 @@ i_read_key(onekey_t * rcmdlist, keeploc_t * locmem, case 'k': case KEY_UP: new_ln = locmem->crs_ln - 1; + new_top = p_lines - 2; break; case 'n': case 'j': case KEY_DOWN: new_ln = locmem->crs_ln + 1; + new_top = 1; break; case ' ': case KEY_PGDN: @@ -525,6 +529,7 @@ i_read_key(onekey_t * rcmdlist, keeploc_t * locmem, case KEY_END: case '$': new_ln = last_line; + new_top = p_lines-1; break; case 'F': case 'U': |