aboutsummaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2001-11-23 21:22:02 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2001-11-23 21:22:02 +0000
commit67012ecb75eb480953e09697f41164218595c52e (patch)
tree549cdabf747df1154957b699008ef70d22cf7b43 /main.c
parentdefault is TRUE (diff)
downloadw3m-67012ecb75eb480953e09697f41164218595c52e.tar.gz
w3m-67012ecb75eb480953e09697f41164218595c52e.zip
add label_topline
Diffstat (limited to '')
-rw-r--r--main.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/main.c b/main.c
index 043e735..2f2d3d1 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.19 2001/11/23 21:05:52 ukai Exp $ */
+/* $Id: main.c,v 1.20 2001/11/23 21:22:02 ukai Exp $ */
#define MAINPROGRAM
#include "fm.h"
#include <signal.h>
@@ -2374,9 +2374,10 @@ loadLink(char *url, char *target, char *referer, FormList * request)
if (al) {
gotoLine(Currentbuf, al->start.line);
#ifdef LABEL_TOPLINE
- Currentbuf->topLine = lineSkip(Currentbuf, Currentbuf->topLine,
- Currentbuf->currentLine->linenumber - Currentbuf->topLine->linenumber,
- FALSE);
+ if (label_topline)
+ Currentbuf->topLine = lineSkip(Currentbuf, Currentbuf->topLine,
+ Currentbuf->currentLine->linenumber - Currentbuf->topLine->linenumber,
+ FALSE);
#endif
Currentbuf->pos = al->start.pos;
arrangeCursor(Currentbuf);
@@ -2408,9 +2409,11 @@ gotoLabel(char *label)
pushBuffer(buf);
gotoLine(Currentbuf, al->start.line);
#ifdef LABEL_TOPLINE
- Currentbuf->topLine = lineSkip(Currentbuf, Currentbuf->topLine,
- Currentbuf->currentLine->linenumber - Currentbuf->topLine->linenumber,
- FALSE);
+ if (label_topline)
+ Currentbuf->topLine = lineSkip(Currentbuf, Currentbuf->topLine,
+ Currentbuf->currentLine->linenumber
+ - Currentbuf->topLine->linenumber,
+ FALSE);
#endif
Currentbuf->pos = al->start.pos;
arrangeCursor(Currentbuf);