aboutsummaryrefslogtreecommitdiffstats
path: root/rc.c
diff options
context:
space:
mode:
authorTatsuya Kinoshita <tats@debian.org>2016-03-20 10:13:29 +0000
committerTatsuya Kinoshita <tats@debian.org>2016-03-20 10:23:39 +0000
commitc010dd7a6b68a7ae2de9cb4444e92fa563be8197 (patch)
tree4de4ac0ef9d0a7a610c0d51c961e14a0e3473d2c /rc.c
parentUpdate ChangeLog (diff)
downloadw3m-c010dd7a6b68a7ae2de9cb4444e92fa563be8197.tar.gz
w3m-c010dd7a6b68a7ae2de9cb4444e92fa563be8197.zip
Fix reverse ordered config parameters
Diffstat (limited to 'rc.c')
-rw-r--r--rc.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/rc.c b/rc.c
index 5fcbf42..7de87b8 100644
--- a/rc.c
+++ b/rc.c
@@ -1512,6 +1512,7 @@ panel_set_option(struct parsed_tagarg *arg)
{
FILE *f = NULL;
char *p;
+ Str s = Strnew(), tmp;
if (config_file == NULL) {
disp_message("There's no config file... config not saved", FALSE);
@@ -1527,14 +1528,17 @@ panel_set_option(struct parsed_tagarg *arg)
if (arg->value) {
p = conv_to_system(arg->value);
if (set_param(arg->arg, p)) {
- if (f)
- fprintf(f, "%s %s\n", arg->arg, p);
+ tmp = Sprintf("%s %s\n", arg->arg, p);
+ Strcat(tmp, s);
+ s = tmp;
}
}
arg = arg->next;
}
- if (f)
+ if (f) {
+ fputs(s->ptr, f);
fclose(f);
+ }
sync_with_option();
backBf();
}