X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=selector.cc;h=2990c7214bc881b4f2c81795e28322f03da0d0a3;hb=09b911cc2eb670c0abd47e58017de5d2c03010b7;hp=13eb43a465f0977afd669a7e67124a02618b0c7b;hpb=41927c77cc6c56eff6a76a646a8ab4d315c90b1b;p=selector.git diff --git a/selector.cc b/selector.cc index 13eb43a..2990c72 100644 --- a/selector.cc +++ b/selector.cc @@ -446,8 +446,8 @@ int main(int argc, char **argv) { file.getline(buffer, buffer_size); char *s = buffer; if(zsh_history && *s == ':') { - s++; - while(*s && *s != ':') s++; + while(*s && *s != ';') s++; + if(*s == ';') s++; } lines[nb_lines] = new char[strlen(s) + 1]; strcpy(lines[nb_lines], s);