From 2c5eaafc8ea301638676a41ed50383ed0b76c0a1 Mon Sep 17 00:00:00 2001 From: Dai Sato Date: Thu, 19 Apr 2007 12:00:37 +0000 Subject: avoid conflicts between input_alt and img_alt, and fix calculation of labeled line numbers when fold_line=1. [w3m-dev 04211] --- file.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'file.c') 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 #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, ""); - if (pre_int) + if (pre_int && !ext_pre_int) Strcat_charp(tmp, ""); if (r) { Strcat_charp(tmp, ""); @@ -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, ""); return tmp; } -- cgit v1.2.3