diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2001-11-23 21:40:19 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2001-11-23 21:40:19 +0000 |
commit | da4c9c4db790a50c7792b837dd39b9cb36da3905 (patch) | |
tree | aa2cdde3d3fb63e661c6136aa761c86ac8e2432b | |
parent | add label_topline (diff) | |
download | w3m-da4c9c4db790a50c7792b837dd39b9cb36da3905.tar.gz w3m-da4c9c4db790a50c7792b837dd39b9cb36da3905.zip |
add nextpage_topline
Diffstat (limited to '')
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | etc.c | 11 | ||||
-rw-r--r-- | fm.h | 5 | ||||
-rw-r--r-- | main.c | 9 | ||||
-rw-r--r-- | rc.c | 13 |
5 files changed, 33 insertions, 13 deletions
@@ -1,5 +1,11 @@ -2001-11-24 Fumitoshi UKAI <ukai@debian.or.jp +2001-11-24 Fumitoshi UKAI <ukai@debian.or.jp> + * fm.h (nextpage_topline): runtime option nextpage_topline + * etc.c (lineSkip): ditto + * main.c (nscroll): ditto + * rc.c (CMT_NEXTPAGE_TOPLINE): ditto + * rc.c (params3): ditto + * fm.h (label_topline): runtime option label_topline * file.c (loadGeneralFile): ditto * main.c (loadLink): ditto @@ -1,4 +1,4 @@ -/* $Id: etc.c,v 1.6 2001/11/21 19:24:35 ukai Exp $ */ +/* $Id: etc.c,v 1.7 2001/11/23 21:40:19 ukai Exp $ */ #include "fm.h" #include <pwd.h> #include "myctype.h" @@ -138,11 +138,12 @@ lineSkip(Buffer * buf, Line * line, int offset, int last) Line *l; l = currentLineSkip(buf, line, offset, last); -#ifndef NEXTPAGE_TOPLINE - for (i = (LASTLINE - 1) - (buf->lastLine->linenumber - l->linenumber); - i > 0 && l->prev != NULL; - i--, l = l->prev); +#ifdef NEXTPAGE_TOPLINE + if (! nextpage_topline) #endif + for (i = (LASTLINE - 1) - (buf->lastLine->linenumber - l->linenumber); + i > 0 && l->prev != NULL; + i--, l = l->prev); return l; } @@ -1,4 +1,4 @@ -/* $Id: fm.h,v 1.17 2001/11/23 21:22:02 ukai Exp $ */ +/* $Id: fm.h,v 1.18 2001/11/23 21:40:19 ukai Exp $ */ /* * w3m: WWW wo Miru utility * @@ -712,6 +712,9 @@ global int vi_prec_num init(TRUE); #ifdef LABEL_TOPLINE global int label_topline init(FALSE); #endif +#ifdef NEXTPAGE_TOPLINE +global int nextpage_topline init(FALSE); +#endif global int displayLink init(FALSE); global int retryAsHttp init(TRUE); global int showLineNum init(FALSE); @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.20 2001/11/23 21:22:02 ukai Exp $ */ +/* $Id: main.c,v 1.21 2001/11/23 21:40:19 ukai Exp $ */ #define MAINPROGRAM #include "fm.h" #include <signal.h> @@ -1110,10 +1110,11 @@ nscroll(int n, int mode) tlnum = Currentbuf->topLine->linenumber; llnum = Currentbuf->topLine->linenumber + LASTLINE - 1; #ifdef NEXTPAGE_TOPLINE - diff_n = 0; -#else - diff_n = n - (tlnum - curtop->linenumber); + if (nextpage_topline) + diff_n = 0; + else #endif + diff_n = n - (tlnum - curtop->linenumber); if (lnum < tlnum) lnum = tlnum + diff_n; if (lnum > llnum) @@ -1,4 +1,4 @@ -/* $Id: rc.c,v 1.11 2001/11/23 21:22:02 ukai Exp $ */ +/* $Id: rc.c,v 1.12 2001/11/23 21:40:19 ukai Exp $ */ /* * Initialization file etc. */ @@ -96,7 +96,10 @@ static int rc_initialized = 0; #define CMT_VI_PREC_NUM "vi風の数値プレフィクス" #endif #ifdef LABEL_TOPLINE -#define CMT_LABEL_TOPLINE "ラベルに移動する時に行頭になるようにする" +#define CMT_LABEL_TOPLINE "ラベルに移動する時にカーソルがトップになるようにする" +#endif +#ifdef NEXTPAGE_TOPLINE +#define CMT_NEXTPAGE_TOPLINE "次のページに移動する時にカーソルがトップになるようにする" #endif #define CMT_SHOW_NUM "行番号を表示する" #define CMT_MIMETYPES "利用するmime.types" @@ -205,6 +208,9 @@ static int rc_initialized = 0; #ifdef LABEL_TOPLINE #define CMT_LABEL_TOPLINE "move cursor to top line when going to label" #endif +#ifdef NEXTPAGE_TOPLINE +#define CMT_NEXTPAGE_TOPLINE "move cursor to top line when moving to next page" +#endif #define CMT_SHOW_NUM "Show line number" #define CMT_MIMETYPES "mime.types files" #define CMT_MAILCAP "mailcap files" @@ -414,6 +420,9 @@ struct param_ptr params3[] = #ifdef LABEL_TOPLINE {"label_topline", P_INT, PI_ONOFF, (void *) &label_topline, CMT_LABEL_TOPLINE, NULL }, #endif +#ifdef NEXTPAGE_TOPLINE + {"nextpage_topline", P_INT, PI_ONOFF, (void *) &nextpage_topline, CMT_NEXTPAGE_TOPLINE, NULL }, +#endif {"wrap_search", P_INT, PI_ONOFF, (void *) &WrapDefault, CMT_WRAP, NULL}, {"ignorecase_search", P_INT, PI_ONOFF, (void *) &IgnoreCase, CMT_IGNORE_CASE, NULL}, #ifdef USE_MOUSE |