aboutsummaryrefslogtreecommitdiffstats
path: root/file.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 /file.c
parentdefault is TRUE (diff)
downloadw3m-67012ecb75eb480953e09697f41164218595c52e.tar.gz
w3m-67012ecb75eb480953e09697f41164218595c52e.zip
add label_topline
Diffstat (limited to '')
-rw-r--r--file.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/file.c b/file.c
index 773cfb6..b1b72a6 100644
--- a/file.c
+++ b/file.c
@@ -1,4 +1,4 @@
-/* $Id: file.c,v 1.11 2001/11/21 19:24:35 ukai Exp $ */
+/* $Id: file.c,v 1.12 2001/11/23 21:22:02 ukai Exp $ */
#include "fm.h"
#include <sys/types.h>
#include "myctype.h"
@@ -1319,18 +1319,20 @@ loadGeneralFile(char *path, ParsedURL * current, char *referer, int flag, FormLi
b->type = "text/plain";
if (pu.label) {
if (proc == loadHTMLBuffer) {
- Anchor *a;
+ Anchor *a;
#ifdef JP_CHARSET
- a = searchURLLabel(b, conv(pu.label, b->document_code, InnerCode)->ptr);
+ a = searchURLLabel(b, conv(pu.label, b->document_code, InnerCode)->ptr);
#else /* not JP_CHARSET */
- a = searchURLLabel(b, pu.label);
+ a = searchURLLabel(b, pu.label);
#endif /* not JP_CHARSET */
- if (a != NULL) {
+ if (a != NULL) {
gotoLine(b, a->start.line);
#ifdef LABEL_TOPLINE
- b->topLine = lineSkip(b, b->topLine,
- b->currentLine->linenumber - b->topLine->linenumber,
- FALSE);
+ if (label_topline)
+ b->topLine = lineSkip(b, b->topLine,
+ b->currentLine->linenumber
+ - b->topLine->linenumber,
+ FALSE);
#endif
b->pos = a->start.pos;
arrangeCursor(b);