From 79af75d00c435ab53e7d3c4b03bb54454b8b6dc9 Mon Sep 17 00:00:00 2001 From: Fumitoshi UKAI Date: Thu, 30 Jan 2003 16:29:11 +0000 Subject: [w3m-dev 03714] -cols 1 -dump -o fold_line=1 * file.c (addnewline): check i == 0, i == l->len * fm.h (_INIT_BUFFER_WIDTH): added (INIT_BUFFER_WIDTH): use _INIT_BUFFER_WIDTH From: Hironori SAKAMOTO --- ChangeLog | 9 ++++++++- file.c | 11 ++++++++++- fm.h | 5 +++-- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index f15529a..9b44e2f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2003-01-31 Hironori SAKAMOTO + + * [w3m-dev 03714] -cols 1 -dump -o fold_line=1 + * file.c (addnewline): check i == 0, i == l->len + * fm.h (_INIT_BUFFER_WIDTH): added + (INIT_BUFFER_WIDTH): use _INIT_BUFFER_WIDTH + 2003-01-31 Hironori SAKAMOTO * [w3m-dev 03713] search with "$" @@ -6958,4 +6965,4 @@ a * [w3m-dev 03276] compile error on EWS4800 * release-0-2-1 * import w3m-0.2.1 -$Id: ChangeLog,v 1.727 2003/01/30 16:26:15 ukai Exp $ +$Id: ChangeLog,v 1.728 2003/01/30 16:29:11 ukai Exp $ diff --git a/file.c b/file.c index 68537a9..317aa45 100644 --- a/file.c +++ b/file.c @@ -1,4 +1,4 @@ -/* $Id: file.c,v 1.213 2003/01/29 17:38:14 ukai Exp $ */ +/* $Id: file.c,v 1.214 2003/01/30 16:29:13 ukai Exp $ */ #include "fm.h" #include #include "myctype.h" @@ -6145,6 +6145,15 @@ addnewline(Buffer *buf, char *line, Lineprop *prop, i--; #endif } + if (i == 0) { + i++; +#ifdef JP_CHARSET + if (CharType(p[i]) == PC_KANJI2) + i++; +#endif + } + if (i == l->len) + return; l->len = i; l->width = COLPOS(l, l->len); bpos += l->len; diff --git a/fm.h b/fm.h index 04a683d..8aea4db 100644 --- a/fm.h +++ b/fm.h @@ -1,4 +1,4 @@ -/* $Id: fm.h,v 1.110 2003/01/29 17:10:37 ukai Exp $ */ +/* $Id: fm.h,v 1.111 2003/01/30 16:29:14 ukai Exp $ */ /* * w3m: WWW wo Miru utility * @@ -523,7 +523,8 @@ typedef struct _DownloadList { #define FONTSTAT_SIZE 4 -#define INIT_BUFFER_WIDTH (COLS - (showLineNum ? 6 : 1)) +#define _INIT_BUFFER_WIDTH (COLS - (showLineNum ? 6 : 1)) +#define INIT_BUFFER_WIDTH ((_INIT_BUFFER_WIDTH > 0) ? _INIT_BUFFER_WIDTH : 0) #define FOLD_BUFFER_WIDTH (FoldLine ? (INIT_BUFFER_WIDTH + 1) : -1) typedef struct { -- cgit v1.2.3