summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2006-09-19 19:45:46 +0800
committerwens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2006-09-19 19:45:46 +0800
commit8a4d2b2da80ecdff7f71a48f85d8cbb81f53d548 (patch)
treef6939123d64bb9b55277ea31cae3ae33600f5742
parent271f41f585830f658957bc9a485869ff02158875 (diff)
downloadpttbbs-8a4d2b2da80ecdff7f71a48f85d8cbb81f53d548.tar
pttbbs-8a4d2b2da80ecdff7f71a48f85d8cbb81f53d548.tar.gz
pttbbs-8a4d2b2da80ecdff7f71a48f85d8cbb81f53d548.tar.bz2
pttbbs-8a4d2b2da80ecdff7f71a48f85d8cbb81f53d548.tar.lz
pttbbs-8a4d2b2da80ecdff7f71a48f85d8cbb81f53d548.tar.xz
pttbbs-8a4d2b2da80ecdff7f71a48f85d8cbb81f53d548.tar.zst
pttbbs-8a4d2b2da80ecdff7f71a48f85d8cbb81f53d548.zip
PageUp, PageDown, End should work with large screen in editor now
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3426 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/edit.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/mbbsd/edit.c b/mbbsd/edit.c
index cf7ff8c1..3d6ee3a4 100644
--- a/mbbsd/edit.c
+++ b/mbbsd/edit.c
@@ -3141,9 +3141,9 @@ vedit(char *fpath, int saveheader, int *islocal)
case Ctrl('B'):
case KEY_PGUP: {
short tmp = curr_buf->currln;
- curr_buf->top_of_win = back_line(curr_buf->top_of_win, 22);
+ curr_buf->top_of_win = back_line(curr_buf->top_of_win, t_lines - 2);
curr_buf->currln = tmp;
- curr_buf->currline = back_line(curr_buf->currline, 22);
+ curr_buf->currline = back_line(curr_buf->currline, t_lines - 2);
curr_buf->curr_window_line = get_lineno_in_window();
if (curr_buf->currpnt > curr_buf->currline->len)
curr_buf->currpnt = curr_buf->currline->len;
@@ -3154,9 +3154,9 @@ vedit(char *fpath, int saveheader, int *islocal)
case Ctrl('F'):
case KEY_PGDN: {
short tmp = curr_buf->currln;
- curr_buf->top_of_win = forward_line(curr_buf->top_of_win, 22);
+ curr_buf->top_of_win = forward_line(curr_buf->top_of_win, t_lines - 2);
curr_buf->currln = tmp;
- curr_buf->currline = forward_line(curr_buf->currline, 22);
+ curr_buf->currline = forward_line(curr_buf->currline, t_lines - 2);
curr_buf->curr_window_line = get_lineno_in_window();
if (curr_buf->currpnt > curr_buf->currline->len)
curr_buf->currpnt = curr_buf->currline->len;
@@ -3174,7 +3174,7 @@ vedit(char *fpath, int saveheader, int *islocal)
curr_buf->redraw_everything = YEA;
break;
case Ctrl('T'): /* tail of file */
- curr_buf->top_of_win = back_line(curr_buf->lastline, 23);
+ curr_buf->top_of_win = back_line(curr_buf->lastline, t_lines - 1);
curr_buf->currline = curr_buf->lastline;
curr_buf->curr_window_line = get_lineno_in_window();
curr_buf->currln = curr_buf->totaln;