Only strip when starting with a num

This makes sure the `:` isn't striped if you have a workspace named:
`:something`.
master
Mikkel Oscar Lyderik 9 years ago
parent ccdcdc3396
commit c2f3530fab

@ -580,7 +580,7 @@ char *handle_workspace_number(bool strip_num, const char *ws_name) {
int len = strlen(ws_name); int len = strlen(ws_name);
for (i = 0; i < len; ++i) { for (i = 0; i < len; ++i) {
if (!('0' <= ws_name[i] && ws_name[i] <= '9')) { 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; strip = true;
++i; ++i;
} }

Loading…
Cancel
Save