i3bar: don't reset verbosity when parsing config values

When i3bar is called with the -V flag but there is no 'verbose yes'
directive in the bar {} config, the verbosity config value is reset.

This will introduce the opposite, negligible issue: you can't disable
i3bar's verbosity by deleting the 'verbose yes' directive in the bar {}
config. To fix this we would need an enum for config.verbose.

Closes #3220.
This commit is contained in:
Orestis Floros 2018-04-16 01:37:18 +03:00
parent ab47d664c2
commit 0a72f2d535
No known key found for this signature in database
GPG Key ID: E9AD9F32E401E38F
1 changed files with 4 additions and 2 deletions

View File

@ -304,8 +304,10 @@ static int config_boolean_cb(void *params_, int val) {
} }
if (!strcmp(cur_key, "verbose")) { if (!strcmp(cur_key, "verbose")) {
DLOG("verbose = %d\n", val); if (!config.verbose) {
config.verbose = val; DLOG("verbose = %d\n", val);
config.verbose = val;
}
return 1; return 1;
} }