aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2001-11-23 21:40:19 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2001-11-23 21:40:19 +0000
commitda4c9c4db790a50c7792b837dd39b9cb36da3905 (patch)
treeaa2cdde3d3fb63e661c6136aa761c86ac8e2432b
parentadd label_topline (diff)
downloadw3m-da4c9c4db790a50c7792b837dd39b9cb36da3905.tar.gz
w3m-da4c9c4db790a50c7792b837dd39b9cb36da3905.zip
add nextpage_topline
Diffstat (limited to '')
-rw-r--r--ChangeLog8
-rw-r--r--etc.c11
-rw-r--r--fm.h5
-rw-r--r--main.c9
-rw-r--r--rc.c13
5 files changed, 33 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 69b01d3..a242afb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/etc.c b/etc.c
index d3d43bf..66705b7 100644
--- a/etc.c
+++ b/etc.c
@@ -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;
}
diff --git a/fm.h b/fm.h
index f5a2183..c2b43ea 100644
--- a/fm.h
+++ b/fm.h
@@ -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);
diff --git a/main.c b/main.c
index 2f2d3d1..556484d 100644
--- a/main.c
+++ b/main.c
@@ -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)
diff --git a/rc.c b/rc.c
index aac3356..387f37f 100644
--- a/rc.c
+++ b/rc.c
@@ -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