commit 75b9c440d35f4208e5f6f8fa94c5ccb84fd5f563
parent f2ad1aa734f98e8e0edae8fdce3c9b1848388a5d
Author: ukai <ukai>
Date: Thu, 27 Dec 2001 17:37:49 +0000
[w3m-dev 02759] fold textarea
From: Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
Diffstat:
4 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,5 +1,13 @@
2001-12-28 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
+ * [w3m-dev 02759] fold textarea
+ * fm.h (FoldTextarea): added
+ * form.c (formUpdateBuffer): check FoldTextarea
+ * rc.c (CMT_FOLD_TEXTAREA): added
+ * rc.c (params1): add "fold_textarea"
+
+2001-12-28 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
+
* [w3m-dev 02757]
* main.c (execdict): w = conv_from_system(word)
* main.c (dictword): call execdict() only
diff --git a/fm.h b/fm.h
@@ -774,6 +774,7 @@ global Str proxy_auth_cookie init(NULL);
global int UseExternalDirBuffer init(TRUE);
global char *DirBufferCommand init("file:///$LIB/dirlist" CGI_EXTENSION);
global int ignore_null_img_alt init(TRUE);
+global int FoldTextarea init(FALSE);
global struct auth_cookie *Auth_cookie init(NULL);
global char *Local_cookie init(NULL);
diff --git a/form.c b/form.c
@@ -358,8 +358,10 @@ formUpdateBuffer(Anchor *a, Buffer *buf, FormItemList *form)
}
}
if (rows > 1) {
- while (p[j] && p[j] != '\r' && p[j] != '\n')
- j++;
+ if (! FoldTextarea) {
+ while (p[j] && p[j] != '\r' && p[j] != '\n')
+ j++;
+ }
if (p[j] == '\r')
j++;
if (p[j] == '\n')
diff --git a/rc.c b/rc.c
@@ -67,6 +67,7 @@ static char *config_file = NULL;
#define CMT_DISPLINK "リンク先の自動表示"
#define CMT_MULTICOL "ファイル名のマルチカラム表示"
#define CMT_ALT_ENTITY "エンティティを ASCII の代替表現で表す"
+#define CMT_FOLD_TEXTAREA "TEXTAREA の行を折り返して表示"
#define CMT_COLOR "カラー表示"
#define CMT_B_COLOR "文字の色"
#define CMT_A_COLOR "アンカーの色"
@@ -179,10 +180,11 @@ static char *config_file = NULL;
/* #define CMT_KANJICODE "Display Kanji Code" */
#define CMT_FRAME "Automatic rendering of frame"
#define CMT_ARGV_IS_URL "Force argument without scheme to URL"
-#define CMT_TSELF "use _self as default target"
+#define CMT_TSELF "Use _self as default target"
#define CMT_DISPLINK "Automatic display of link URL"
#define CMT_MULTICOL "Multi-column output of file names"
#define CMT_ALT_ENTITY "Use alternate expression with ASCII for entity"
+#define CMT_FOLD_TEXTAREA "Fold lines of TEXTAREA"
#define CMT_COLOR "Display with color"
#define CMT_B_COLOR "Color of normal character"
#define CMT_A_COLOR "Color of anchor"
@@ -390,6 +392,8 @@ struct param_ptr params1[] = {
{"multicol", P_INT, PI_ONOFF, (void *)&multicolList, CMT_MULTICOL, NULL},
{"alt_entity", P_CHARINT, PI_ONOFF, (void *)&UseAltEntity, CMT_ALT_ENTITY,
NULL},
+ {"fold_textarea", P_CHARINT, PI_ONOFF, (void *)&FoldTextarea,
+ CMT_FOLD_TEXTAREA, NULL},
{"ignore_null_img_alt", P_INT, PI_ONOFF, (void *)&ignore_null_img_alt,
CMT_IGNORE_NULL_IMG_ALT, NULL},
{"view_unseenobject", P_INT, PI_ONOFF, (void *)&view_unseenobject,