diff options
-rw-r--r-- | quickmarks | 6 | ||||
-rw-r--r-- | xxxterm.c | 13 |
2 files changed, 13 insertions, 6 deletions
diff --git a/quickmarks b/quickmarks index 9e521f8..23ab2a8 100644 --- a/quickmarks +++ b/quickmarks @@ -6,7 +6,7 @@ # spaces or tabs is ignored, and will be deleted when xxxterm writes to # this file. # +c http://www.cyphertite.com +C http://www.conformal.com +p http://www.peereboom.us O http://www.openbsd.org -w http://en.wikipedia.org -g http://www.google.com -d http://www.duckduckgo.com diff --git a/xxxterm.c b/xxxterm.c index 28fd0ff..329a3a0 100644 --- a/xxxterm.c +++ b/xxxterm.c @@ -2975,7 +2975,7 @@ xtp_page_fl(struct tab *t, struct karg *args) if ((title = fparseln(f, &len, &lineno, delim, 0)) == NULL) if (feof(f) || ferror(f)) break; - if (len == 0) { + if (strlen(title) == 0 || title[0] == '#') { free(title); title = NULL; continue; @@ -6713,13 +6713,20 @@ qmarks_load() return (1); } - for (i = 0; ; i++) { + for (i = 1; ; i++) { if ((line = fparseln(f, &linelen, NULL, NULL, 0)) == NULL) if (feof(f) || ferror(f)) break; + if (strlen(line) == 0 || line[0] == '#') { + free(line); + line = NULL; + continue; + } + p = strtok(line, " \t"); - if (p == NULL || strlen(p) != 1 || (index = marktoindex(*p)) == -1) { + if (p == NULL || strlen(p) != 1 || + (index = marktoindex(*p)) == -1) { warnx("corrupt quickmarks file, line %d", i); break; } |