diff options
author | victor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-01-17 19:54:09 +0800 |
---|---|---|
committer | victor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-01-17 19:54:09 +0800 |
commit | 054b72f10e98006089f663c68a3fe39908fdce63 (patch) | |
tree | a79b95dea9e20c9828d038a45dadea5ba1087656 /mbbsd | |
parent | c8fbdde7e4edf0f50865dd627ed8294a4fa532f4 (diff) | |
download | pttbbs-054b72f10e98006089f663c68a3fe39908fdce63.tar pttbbs-054b72f10e98006089f663c68a3fe39908fdce63.tar.gz pttbbs-054b72f10e98006089f663c68a3fe39908fdce63.tar.bz2 pttbbs-054b72f10e98006089f663c68a3fe39908fdce63.tar.lz pttbbs-054b72f10e98006089f663c68a3fe39908fdce63.tar.xz pttbbs-054b72f10e98006089f663c68a3fe39908fdce63.tar.zst pttbbs-054b72f10e98006089f663c68a3fe39908fdce63.zip |
fix last commit's bug
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2405 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/edit.c | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/mbbsd/edit.c b/mbbsd/edit.c index 45ee555e..54d90cdb 100644 --- a/mbbsd/edit.c +++ b/mbbsd/edit.c @@ -2345,30 +2345,32 @@ vedit(char *fpath, int saveheader, int *islocal) break; case Ctrl('B'): - case KEY_PGUP: + case KEY_PGUP: { + short tmp = curr_buf->currln; + curr_buf->top_of_win = back_line(curr_buf->top_of_win, 22); + curr_buf->currln = tmp; + curr_buf->currline = back_line(curr_buf->currline, 22); + curr_buf->curr_window_line = getlineno(); + if (curr_buf->currpnt > curr_buf->currline->len) + curr_buf->currpnt = curr_buf->currline->len; + curr_buf->redraw_everything = YEA; + curr_buf->line_dirty = 0; + break; + } case Ctrl('F'): - case KEY_PGDN: - if (ch == Ctrl('B') || KEY_PGUP) { - short tmp = curr_buf->currln; - curr_buf->top_of_win = back_line(curr_buf->top_of_win, 22); - curr_buf->currln = tmp; - curr_buf->currline = back_line(curr_buf->currline, 22); - } - else if (ch == Ctrl('F') || KEY_PGDN) { - short tmp = curr_buf->currln; - curr_buf->top_of_win = forward_line(curr_buf->top_of_win, 22); - curr_buf->currln = tmp; - curr_buf->currline = forward_line(curr_buf->currline, 22); - } - else - break; + case KEY_PGDN: { + short tmp = curr_buf->currln; + curr_buf->top_of_win = forward_line(curr_buf->top_of_win, 22); + curr_buf->currln = tmp; + curr_buf->currline = forward_line(curr_buf->currline, 22); curr_buf->curr_window_line = getlineno(); if (curr_buf->currpnt > curr_buf->currline->len) curr_buf->currpnt = curr_buf->currline->len; curr_buf->redraw_everything = YEA; curr_buf->line_dirty = 0; break; + } case KEY_END: case Ctrl('E'): |