Pass correct flags to fnmatch.

This commit is contained in:
nicm 2020-04-09 13:49:21 +00:00
parent 0e8710f507
commit c4d0089edb

View File

@ -1213,7 +1213,7 @@ window_pane_search(struct window_pane *wp, const char *term, int regex,
} }
log_debug("%s: %s", __func__, line); log_debug("%s: %s", __func__, line);
if (!regex) if (!regex)
found = (fnmatch(new, line, 0) == 0); found = (fnmatch(new, line, flags) == 0);
else else
found = (regexec(&r, line, 0, NULL, 0) == 0); found = (regexec(&r, line, 0, NULL, 0) == 0);
free(line); free(line);