diff --git a/spectrwm.c b/spectrwm.c index 97ed112..3545ccb 100644 --- a/spectrwm.c +++ b/spectrwm.c @@ -9573,6 +9573,11 @@ conf_load(const char *filename, int keymapping) configopt[optidx].optname); continue; } + /* trim trailing spaces */ + ce = optval + strlen(optval) - 1; + while (ce > optval && isspace(*ce)) + --ce; + *(ce + 1) = '\0'; /* call function to deal with it all */ if (configopt[optidx].func(optsub, optval, configopt[optidx].funcflags) != 0) {