From: Tiago Cunha Date: Fri, 18 May 2012 14:04:21 +0000 (+0100) Subject: Move a few spaces to the right place. X-Git-Url: https://jasonwoof.com/gitweb/?a=commitdiff_plain;ds=sidebyside;h=d37bb62834875c1db38b60617d36c60093fe7770;p=spectrwm.git Move a few spaces to the right place. The format should only be manipulated by the bar_fmt function or the user. Thus, delete extra space when outputting the window name and move the strlcat(3) call that appends four spaces where it belongs. Inside the window title conditional. Noticed by LordReg. --- diff --git a/spectrwm.c b/spectrwm.c index 09c7ede..acbfded 100644 --- a/spectrwm.c +++ b/spectrwm.c @@ -1381,7 +1381,6 @@ bar_window_name(char *s, size_t sz, struct swm_region *r) if (r->ws->focus->floating) strlcat(s, "(f) ", sz); strlcat(s, (char *)title, sz); - strlcat(s, " ", sz); XFree(title); } @@ -1467,15 +1466,14 @@ bar_fmt(char *fmtexp, char *fmtnew, struct swm_region *r, size_t sz) if (title_class_enabled && r != NULL && r->ws != NULL && r->ws->focus != NULL) strlcat(fmtnew, ":", sz); - strlcat(fmtnew, "+T", sz); + strlcat(fmtnew, "+T ", sz); } - strlcat(fmtnew, " ", sz); if (window_name_enabled) - strlcat(fmtnew, "+64W", sz); + strlcat(fmtnew, "+64W ", sz); /* finally add the action script output and the version */ - strlcat(fmtnew, " +A +V", sz); + strlcat(fmtnew, " +A +V", sz); } /* replaces the bar format character sequences (like in tmux(1)) */