]> code.delx.au - spectrwm/blobdiff - spectrwm.c
Strip trailing padding with urgent_collapse
[spectrwm] / spectrwm.c
index b81985e08c5a435df7253cadb89bfad437a65bd9..de42566364b54ce27251447b5895e107b15cc809 100644 (file)
@@ -9,6 +9,7 @@
  * Copyright (c) 2011-2012 Lawrence Teo <lteo@lteo.net>
  * Copyright (c) 2011-2012 Tiago Cunha <tcunha@gmx.com>
  * Copyright (c) 2012-2015 David Hill <dhill@mindcry.org>
+ * Copyright (c) 2014-2015 Yuri D'Elia <yuri.delia@eurac.edu>
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -2226,6 +2227,8 @@ bar_urgent(char *s, size_t sz)
                        strlcat(s, "- ", sz);
                }
        }
+       if(urgent_collapse && s[0])
+               s[strlen(s) - 1] = 0;
 }
 
 void