aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorDai Sato <satodai@w3m.jp>2007-04-19 12:00:37 +0000
committerDai Sato <satodai@w3m.jp>2007-04-19 12:00:37 +0000
commit2c5eaafc8ea301638676a41ed50383ed0b76c0a1 (patch)
tree157101119feaa43ed1a1444616f0710cd9a65fb3 /file.c
parentdisplay <em> and <i> elements with underline. [w3m-dev 04197] (diff)
downloadw3m-2c5eaafc8ea301638676a41ed50383ed0b76c0a1.tar.gz
w3m-2c5eaafc8ea301638676a41ed50383ed0b76c0a1.zip
avoid conflicts between input_alt and img_alt, and fix calculation of labeled line numbers when fold_line=1. [w3m-dev 04211]
Diffstat (limited to 'file.c')
-rw-r--r--file.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/file.c b/file.c
index e48965f..14294ab 100644
--- a/file.c
+++ b/file.c
@@ -1,4 +1,4 @@
-/* $Id: file.c,v 1.250 2006/12/27 02:15:24 ukai Exp $ */
+/* $Id: file.c,v 1.251 2007/04/19 12:00:37 inu Exp $ */
#include "fm.h"
#include <sys/types.h>
#include "myctype.h"
@@ -2250,7 +2250,7 @@ loadGeneralFile(char *path, ParsedURL *volatile current, char *referer,
}
else { /* plain text */
int l = atoi(pu.label);
- gotoLine(b, l);
+ gotoRealLine(b, l);
b->pos = 0;
arrangeCursor(b);
}
@@ -3161,7 +3161,7 @@ process_img(struct parsed_tag *tag, int width)
#else
int w, i, nw, n;
#endif
- int pre_int = FALSE;
+ int pre_int = FALSE, ext_pre_int = FALSE;
Str tmp = Strnew();
if (!parsedtag_get_value(tag, ATTR_SRC, &p))
@@ -3217,6 +3217,8 @@ process_img(struct parsed_tag *tag, int width)
parsedtag_get_value(tag, ATTR_HEIGHT, &i);
r = NULL;
parsedtag_get_value(tag, ATTR_USEMAP, &r);
+ if (parsedtag_exists(tag, ATTR_PRE_INT))
+ ext_pre_int = TRUE;
tmp = Strnew_size(128);
#ifdef USE_IMAGE
@@ -3445,7 +3447,7 @@ process_img(struct parsed_tag *tag, int width)
}
#endif
Strcat_charp(tmp, "</img_alt>");
- if (pre_int)
+ if (pre_int && !ext_pre_int)
Strcat_charp(tmp, "</pre_int>");
if (r) {
Strcat_charp(tmp, "</input_alt>");
@@ -3584,7 +3586,7 @@ process_input(struct parsed_tag *tag)
Strcat(tmp, Sprintf(" width=\"%d\"", iw));
if (parsedtag_get_value(tag, ATTR_HEIGHT, &ih))
Strcat(tmp, Sprintf(" height=\"%d\"", ih));
- Strcat_charp(tmp, ">");
+ Strcat_charp(tmp, " pre_int>");
Strcat_charp(tmp, "</input_alt></pre_int>");
return tmp;
}