diff options
author | Mikkel Oscar Lyderik <mikkeloscar@gmail.com> | 2016-01-03 17:48:47 +0100 |
---|---|---|
committer | Mikkel Oscar Lyderik <mikkeloscar@gmail.com> | 2016-01-03 17:48:47 +0100 |
commit | c2f3530fab9c96318e0a1e4b21e02e54792d5900 (patch) | |
tree | 3b6f8612a441e4db3db0c4f12726854d63000a6b /swaybar/main.c | |
parent | ccdcdc339679284887778ec1eff548afdc4c5511 (diff) |
Only strip when starting with a num
This makes sure the `:` isn't striped if you have a workspace named:
`:something`.
Diffstat (limited to 'swaybar/main.c')
-rw-r--r-- | swaybar/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/swaybar/main.c b/swaybar/main.c index 34c54287..3ac337d1 100644 --- a/swaybar/main.c +++ b/swaybar/main.c @@ -580,7 +580,7 @@ char *handle_workspace_number(bool strip_num, const char *ws_name) { int len = strlen(ws_name); for (i = 0; i < len; ++i) { if (!('0' <= ws_name[i] && ws_name[i] <= '9')) { - if (':' == ws_name[i] && i < len-1) { + if (':' == ws_name[i] && i < len-1 && i > 0) { strip = true; ++i; } |